how to copy a data from file to PostgreSQL using JDBC?
I want to copy data from file to PostgreSQL DB using JDBC. I was using JDBC statement object to copy the file into DB. It is very slow. I came to know that we can also use copy out command to copy file to DB. But, how do i do with JDBC. Even good reference material having an example of copy in JDBC would help. PS: thanks in advance This works... import java.io.FileReader; import java.sql.Connection; import java.sql.DriverManager; import org.postgresql.copy.CopyManager; import org.postgresql.core.BaseConnection; public class PgSqlJdbcCopyStreamsExample { public static void main(String[] args)