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

From Andrew Dunstan
Subject Re: Schema-qualified statements in pg_dump output
Date
Msg-id 487231C4.3080707@dunslane.net
Whole thread Raw
In response to Re: 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 wrote:
> --On Montag, Juli 07, 2008 10:33:35 -0400 Tom Lane <tgl@sss.pgh.pa.us> 
> wrote:
>
>> 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.
>
> Hmm, If i want to restore just a bunch of tables into a different 
> schema, all i need to do is to change the dump's search_path then and 
> i don't have to bother with DDL statements having hardwired schema 
> qualifications. So this seems a straight forward simplification to me.
>

Why not restore into the original schema name and then rename it? If the 
schema already exists you could rename it temporarily and then rename it 
back after the restore.

Or, as you originally noted, a simple sed filter on the text dump might 
work equally as well.

I don't think in general we need to provide pg_dump with every possible 
permutation of uses that can achieved with the construction of simple 
tool chains.

cheers

andrew


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Userset logging
Next
From: Tom Lane
Date:
Subject: Re: deadlock_timeout