pg_dump restore error - Mailing list pgsql-hackers

From Gilles Darold
Subject pg_dump restore error
Date
Msg-id 507AD08C.5020603@dalibo.com
Whole thread Raw
Responses Re: pg_dump restore error
List pgsql-hackers
Hello,

Restoring a backup generated with pg_dump/pg_dumpall in plain text
format and the --clean option will report errors if the backup is loaded
in an other or empty database. I mean that the backup file contains all
SQL order to drop the database's objects before recreating them, so if
you load this backup into a new database it will throw errors on each
DROP call complaining that the objects doesn't exists.

This is not very important because everything goes fine but these error
reports can be easily prevented with the addition of IF EXISTS clauses
and this will probably be less confusing. I've attached a patch adding
those IF EXISTS on each DROP and ALTER statements.

Best regards,

--
Gilles Darold
http://dalibo.com - http://dalibo.org


Attachment

pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Deprecating Hash Indexes
Next
From: Peter Geoghegan
Date:
Subject: Re: tuplesort memory usage: grow_memtuples