Search Postgresql Archives

Re: Postgresql - COPY TO - get number row inserted - from JDBC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/07/2015 06:14 AM, Nicolas Paris wrote:
Hello !

My goal is to get the result from "COPY TO ..."  query, from JDBC. This
query returns : COPY X
(where X is number line inserted)
1) Can I can I consider it useless, since when no error, all lines are
suposed to be inserted ?
2) If not useless, how can I get the response "COPY 10" (when 10 rows
inserted), I get with psql way, or with pgadmin.

I have tried the int Statement.executeUpdate() method, but it returns 0

Thanks for any help !

I am not a Java programmer, but I think what you want is here:

https://jdbc.postgresql.org/documentation/publicapi/index.html

under org.postgresql.copy


Nicolas PARIS


--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux