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.


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly

Reply via email to