Re: [HACKERS] Allow COPY from STDIN to absorb all input before throwing an error

2008-04-09 Thread Decibel!
On Apr 8, 2008, at 5:10 PM, Stephen Denne wrote: I had an annoying experience with COPY within psql yesterday. I had a dump of just three tables, which I wanted to investigate. I tried loading them into an empty database, using psql's \i command. The table creation failed as dependent

[HACKERS] Allow COPY from STDIN to absorb all input before throwing an error

2008-04-08 Thread Decibel!
When restoring from pg_dump(all), if a problem occurs in a COPY command you're going to get a whole slew of errors, because as soon as COPY detects a problem it will throw an error and psql will immediately switch to trying to process the remaining data that was meant for COPY as if it was

Re: [HACKERS] Allow COPY from STDIN to absorb all input before throwing an error

2008-04-08 Thread Neil Conway
On Tue, 2008-04-08 at 15:26 -0500, Decibel! wrote: My idea to avoid this situation is to add an option to COPY that tells it not to throw an error until it runs out of input data. An alternative would be to have the client continue reading (and discarding) COPY input until the

Re: [HACKERS] Allow COPY from STDIN to absorb all input before throwing an error

2008-04-08 Thread Tom Lane
Decibel! [EMAIL PROTECTED] writes: When restoring from pg_dump(all), if a problem occurs in a COPY command you're going to get a whole slew of errors, because as soon as COPY detects a problem it will throw an error and psql will immediately switch to trying to process the remaining data

Re: [HACKERS] Allow COPY from STDIN to absorb all input before throwing an error

2008-04-08 Thread Stephen Denne
Tom Lane wrote Decibel! [EMAIL PROTECTED] writes: When restoring from pg_dump(all), if a problem occurs in a COPY command you're going to get a whole slew of errors, because as soon as COPY detects a problem it will throw an error and psql will immediately switch to trying to