Schema-qualified statements in pg_dump output - Mailing list pgsql-hackers

From Bernd Helmle
Subject Schema-qualified statements in pg_dump output
Date
Msg-id FF62236EACF7739BC1C3AEC0@imhotep.credativ.de
Whole thread Raw
Responses Re: Schema-qualified statements in pg_dump output  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Schema-qualified statements in pg_dump output  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [PATCHES] GIN improvements
Next
From: Teodor Sigaev
Date:
Subject: Re: [PATCHES] GIN improvements