So, considering the test case I attached in my previous message, do you think it should be possible to retrieve the error message (Invalid syntax for integer "Bad key", CONTEXT: COPY test, line 10, column id: "Bad key") without waiting for complete transmission?
Do you think it is possible to modify psycopg2 to implement what you suggested? I guess the related code is in file pqpath.c, function _pq_copy_in_v3, correct?
On Tue, Feb 1, 2011 at 14:18, Marko Kreen
<markokr@gmail.com> wrote:
No, the error message should arrive immediately. But it may be deficiency of
libpq that you cannot aquire it before ending the copy.
I'm not sure about that actually. It should be possible to call
select() & PQconsumeInput
between copy calls, thus also PQgetResult to get the error.
--
marko