Re: [GENERAL] Why copy ... from stdio does not return immediately when reading invalid data?

2011-02-07 Thread Nicolas Grilly
I have analyzed the PostgreSQL protocol using Wireshark (an open source packet analyzer), and I observed that the PostgreSQL backend, while doing a COPY ... FROM STDIN, reports errors as soon as possible (especially errors related to invalid data). Therefore, the late reporting of errors while

[GENERAL] Why copy ... from stdio does not return immediately when reading invalid data?

2011-02-02 Thread Nicolas Grilly
Hello, I am importing gigabytes of data into PostgreSQL, and I don't want to wait 10 minutes just to discover an error in the 10th line of my input file. I tried the command \copy ... from stdio in psql and it looks like psql has to read the entire input before returning a potential error, even

Re: [GENERAL] Why copy ... from stdio does not return immediately when reading invalid data?

2011-02-02 Thread John R Pierce
On 02/02/11 10:20 AM, Nicolas Grilly wrote: Is the copy protocol (aka PQputCopyData and PQputCopyEnd) designed to send gigabytes of data with just one copy ... from stdio query, and is there a way to be notified of a potential error before calling PQputCopyEnd? Or do I have to send my data in