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 psql commands. This is confusing and annoying at best; it could conceivably trash data at worst (picture dumping a table that had SQL commands in it).

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. Of course once it finds a problem it would just throw all the input data away, but when used in the context of a dump file this would remove all the bogus errors that either psql or the backend will generate when trying to process table data as if it was commands.
--
Decibel!, aka Jim C. Nasby, Database Architect  [EMAIL PROTECTED]
Give your computer some brain candy! www.distributed.net Team #1828


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to