Re: pg_dump and pg_dumpall in real life - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: pg_dump and pg_dumpall in real life
Date
Msg-id 5280E9A3.4010304@dunslane.net
Whole thread Raw
In response to pg_dump and pg_dumpall in real life  (Rafael Martinez <r.m.guerrero@usit.uio.no>)
Responses Re: pg_dump and pg_dumpall in real life  (David Johnston <polobo@yahoo.com>)
List pgsql-hackers
On 11/11/2013 08:59 AM, Rafael Martinez wrote:
>
> * It would be great to be able to tell pg_restore that user1 in the
> dump will became user2 in the restored/cloned database. The same for
> the name of the database.

A general ability to rename things would be good. In particular, 
restoring schema x into schema y or table x into table y would be very 
useful, especially if you need to be able to compare old with new.

Unfortunately, this would involve a fairly significant change in the 
design of pg_dump / pg_restore. The stored SQL is currently fairly 
opaque, and a renaming scheme would probably need to implement instead 
some sort of placeholder mechanism. That would mean a LOT of work.


cheers

andrew





pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Datatyp of a column
Next
From: "Colin 't Hart"
Date:
Subject: Re: Execute query with EXCEPT, INTERSECT as anti-join, join?