There's a behavior in pg_dump that annoyed me a little bit, the last few times i had to deal with it:

Consider you have to dump a specific namespace only, you are going to use

pg_dump -n <your_schema> [-t <tables>].

I found it a common use case to restore this dump into a different schema by simply changing the search_path. With included ownerships this doesn't work, since pg_dump always outputs the necessary DDL as follows:

ALTER TABLE bernd.foo OWNER TO bernd;

Okay, it isn't too hard to use sed to replace the necessary statements to use the correct schema, but i think it would be much nicer if pg_dump would omit the schema-qualified table name here. I'd like to create a patch for this, if we agree on changing this behavior?

--
 Thanks

                   Bernd

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to