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

From Tom Lane
Subject Re: Schema-qualified statements in pg_dump output
Date
Msg-id 9666.1215441215@sss.pgh.pa.us
Whole thread Raw
In response to Schema-qualified statements in pg_dump output  (Bernd Helmle <mailings@oopsware.de>)
Responses Re: Schema-qualified statements in pg_dump output  (Bernd Helmle <mailings@oopsware.de>)
List pgsql-hackers
Bernd Helmle <mailings@oopsware.de> writes:
> 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?

It seems like quite a useless change, since in general there will be
other qualified references in the dump that can't safely be removed.
IOW what you intend to do doesn't work anyway.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [PATCHES] GIN improvements
Next
From: David Fetter
Date:
Subject: Re: [PATCHES] WITH RECURSIVE updated to CVS TIP