Re: [repost] pg_restore doesn't work with custom format? - Mailing list pgsql-admin

From Stephan Szabo
Subject Re: [repost] pg_restore doesn't work with custom format?
Date
Msg-id Pine.BSF.4.21.0110191740220.34111-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Re: [repost] pg_restore doesn't work with custom format?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [repost] pg_restore doesn't work with custom format?
List pgsql-admin
On Fri, 19 Oct 2001, Tom Lane wrote:

> 1. Target database is named by -d switch, else default to dbname
>    from dump file.
>
> 2. If --create specified, connect to template1 and issue CREATE DATABASE
>    for target.

Should there be an option for what database as template for doing the
create when you're doing a --create?  Just wondering if there might
be a case where you'd want to create based on template0 if you're moving
between machines where template1 is different and you don't want the
extra stuff.

> 3. Connect to target database.
>
> 4. If --clean specified, issue DROP commands.  (Note that --clean
>    --create is not too sensible since DROPs cannot be needed in a new
>    database.  Should we ignore --clean if --create was given too?)
>
> 5. Issue create and data loading commands.

Seems sensible.  I think pg_dump should probably follow similar rules
for --create and --clean when making dump files that you're going to
run through psql.


pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: [repost] pg_restore doesn't work with custom format?
Next
From: "Sudheer Palaparambil"
Date:
Subject: REMOTE PROCEDURE CALLS