PgSql Jdbc Copy Streams Example

Posted on 2013-05-08 13:46  JasmineLiu  阅读(405)  评论(0编辑  收藏  举报

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.");
}
}

Copyright © 2024 JasmineLiu
Powered by .NET 8.0 on Kubernetes