Re: [GENERAL] How do I bump a row to the front of sort efficiently

2015-02-07 Thread Paul Jungwirth
> Or maybe instead of a view you could write a > set-returning function, e.g. as described here: I thought I'd see if I could make this work just for fun. Here is a simple proof of concept (on 9.3): -- DROP TABLE IF EXISTS topics; CREATE TABLE topics ( id INTEGER PRIMARY KEY, bumped_at INTEGE

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

2015-02-07 Thread Nicolas Paris
Thanks Adrian and Thomas. I get it worked with CopyIn(sql, inputstream) method, and then with "FROM STDIN". If someone interested in ETL Talend software, I actually modified the component "tPostgresqlBulkExec". You can find it there : https://github.com/parisni/tPostgresqlBulkExec.git I guess this

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

2015-02-07 Thread Thomas Kellerer
Nicolas Paris wrote on 07.02.2015 15:14: 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, h

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

2015-02-07 Thread Adrian Klaver
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,

[GENERAL] Postgresql - COPY TO - get number row inserted - from JDBC

2015-02-07 Thread Nicolas Paris
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