PgSql Jdbc Copy Streams Example

public class PgSqlJdbcCopyStreamsExample
{
public static void main(String[] args) throws Exception
{
String url = "jdbc:highgo://localhost:5866/";
String user = "highgo";
String pwd = "hg";
Class.forName("com.highgo.jdbc.Driver");
Connection con = DriverManager.getConnection(url, user, pwd);

CopyManager copyManager = new CopyManager((BaseConnection) con);
FileReader fileReader = new FileReader("d:/bbb.txt");
copyManager.copyIn("COPY yy.ii FROM STDIN", fileReader);

System.err.println("Done.");
}
}

原文地址:https://www.cnblogs.com/liuyuanyuanGOGO/p/3066646.html