Allow COPY from STDIN to absorb all input before throwing an error
От | Decibel! |
---|---|
Тема | Allow COPY from STDIN to absorb all input before throwing an error |
Дата | |
Msg-id | 17145E90-F359-42FD-A5A8-A777237F57A5@decibel.org обсуждение исходный текст |
Ответы |
Re: Allow COPY from STDIN to absorb all input before
throwing an error
Re: Allow COPY from STDIN to absorb all input before throwing an error |
Список | pgsql-hackers |
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 decibel@decibel.org Give your computer some brain candy! www.distributed.net Team #1828
В списке pgsql-hackers по дате отправления: