Pg_dump behaviour
Pg_dump behaviour
От:
Hélder M. Vieira <hmv@mail.telepac.pt>
Дата:
I often perform single-table backups using pgadmin. Recently, a problem occurred while doing that kind of backup using pgadmin 1.6.2 and PostgreSQL 8.2.1 on a Windows server: When trying to backup a table contained in a specific schema, pg_dump can't find the table. For instance, I have a database named 'mdg', containing a schema named 'art', in turn containing a table named 'tefh'. When I try to backup this table to the root directory with pgadmin, it generates and executes the following command: pg_dump.exe -i -h localhost -p 5432 -U postgres -F c -v -f "c:\tefh" -t tefh -n art mdg Pg_dump then raises the following error: pg_dump: No matching tables were found I tried some alternatives from the command line, but pg_dump only seems to make the single-table backup when the table name is qualified, as in: pg_dump.exe -i -h localhost -p 5432 -U postgres -F c -v -f "c:\tefh" -t art.tefh mdg At this point, I'd say that the command generated by pgadmin should work, as it seems to be consistent with pg_dump documentation. Any hints ? Thank you. Hélder M. Vieira
Re: Pg_dump behaviour
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"=?iso-8859-1?Q?H=E9lder_M._Vieira?=" writes: > I often perform single-table backups using pgadmin. > Recently, a problem occurred while doing that kind of backup using pgadmin > 1.6.2 and PostgreSQL 8.2.1 on a Windows server: > For instance, I have a database named 'mdg', containing a schema named > 'art', in turn containing a table named 'tefh'. > When I try to backup this table to the root directory with pgadmin, it > generates and executes the following command: > pg_dump.exe -i -h localhost -p 5432 -U postgres -F c -v -f "c:\tefh" -t > tefh -n art mdg That was the pre-8.2 way to do it; now the right thing would be -t art.tefh Sounds like pgadmin needs an update. While they're at it, they should definitely lose the -i switch ... using that by default is extremely stupid/dangerous. regards, tom lane
Re: Pg_dump behaviour
От:
Hélder M. Vieira <hmv@mail.telepac.pt>
Дата:
----- Original Message ----- From: "Tom Lane" To: "Hélder M. Vieira" Cc: Sent: Monday, January 15, 2007 3:39 PM Subject: Re: [ADMIN] Pg_dump behaviour ... > That was the pre-8.2 way to do it; now the right thing would be > -t art.tefh > Sounds like pgadmin needs an update. ... Thanks for clarifying. The second note in the '-t' option description in the pg_dump documentation is a clear warning. I'll submit a bug report in the pgadmin mailling list. Regards, Helder M. Vieira