From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
Cc: | Postgresql <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Timely reporting of COPY errors |
Date: | 2008-04-16 21:22:17 |
Message-ID: | 23259.1208380937@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Martijn van Oosterhout <kleptog(at)svana(dot)org> writes:
> I notice that while doing bulk-loads that any errors detected by the
> backend arn't noticed by libpq until right at the end. Is this
> intentional?
I dunno about "intentional", but the API exposed by libpq for COPY
doesn't really permit any other behavior: you push all the data and
then look to see if it worked or not.
Even if we had some way of letting the application notice that the copy
had already failed, I don't see that psql could do very much with it,
at least not for COPY FROM STDIN. It's got to read through the source
data anyway or it'll be out of sync with the script file.
We could possibly fix libpq to start dropping the data on the floor
if it sees an error reply already pending, but that's only going
to be an incremental change.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2008-04-16 21:27:46 | Re: printTable API (was: Show INHERIT in \du) |
Previous Message | Brendan Jurd | 2008-04-16 21:19:55 | Re: [HACKERS] Text <-> C string |