Обсуждение: pg_restore --data-only (-a) does not work
I tried countless ways to try to restore data only for all tables using the -a switch. None seem to work. I was able to restoredata only for specific tables using the -t switch, but I was expecting that I should be able to invoke a command with-a that checks all tables and restores all data appropriately. Here's the last thing I tried. bash-2.03$ pg_restore -c -a -d [dbname] ../data/backups/[-Fc Archive] pg_restore: [archiver (db)] error returned by PQputline Any ideas?? Thanks, Gary
"Barna, Gary" <Gary.Barna@storagenetworks.com> writes:
> bash-2.03$ pg_restore -c -a -d [dbname] ../data/backups/[-Fc Archive]
> pg_restore: [archiver (db)] error returned by PQputline
Lessee ... you drop all the tables (-c) and then try to restore data
without recreating them (-a) ... not too surprising it doesn't work.
I agree the error message sucks though.
FWIW, CVS tip seems to be bright enough to ignore -c when used in
combination with -a; also it gives a more useful message when there
is a failure during a COPY command.
regards, tom lane