简体   繁体   English

postgresql jdbc驱动有\\ copy吗?

[英]does postgresql jdbc driver has \copy?

as stated, 就像声明的那样,

does java jdbc driver for postgresql has client side \\copy? postgresql的java jdbc驱动有客户端\\ copy吗?

I wanted to do batch inserts into a table in the database on a remote machine with data from my text file on another machine. 我想在远程计算机上的数据库中使用我的文本文件中的数据批量插入到另一台计算机上。

Since the 8.4 driver there is support for the COPY command, through the CopyManager: 由于8.4驱动程序通过CopyManager支持COPY命令:

http://jdbc.postgresql.org/documentation/publicapi/org/postgresql/copy/CopyManager.html http://jdbc.postgresql.org/documentation/publicapi/org/postgresql/copy/CopyManager.html

add ip of your system from where you used to update database in pg_hba.conf file connect usinyg url 在pg_hba.conf文件中连接usinyg url,从用于更新数据库的位置添加系统的ip

jdbc:postgresql://host:port/database

execute query 执行查询

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM