Re: Adding an ignore list to pg_restore - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Adding an ignore list to pg_restore
Date
Msg-id 28645.1140291279@sss.pgh.pa.us
Whole thread Raw
In response to Re: Adding an ignore list to pg_restore  (Martin Pitt <mpitt@debian.org>)
Responses Re: Adding an ignore list to pg_restore
Re: Adding an ignore list to pg_restore, prototype patch #1
List pgsql-hackers
Martin Pitt <mpitt@debian.org> writes:
> Tom Lane [2006-02-18 13:32 -0500]:
>> Martin Pitt <mpitt@debian.org> writes:
>>> The core problem is that we want to not restore objects (mainly
>>> tables) in the destination database which already exist.
>>
>> Why is this a problem?  It's already the default behavior --- the
>> creation commands fail but pg_restore keeps going.

> The problem is that pg_restore would restore the TABLE DATA object,
> although we don't want that (the postgis specific tables are
> pre-populated by PostGIS itself, and should not be altered by the
> upgrade.

Hm.  Rather than a variant of the -L facility (which is hard to use,
and I don't see your proposal being much easier), maybe what's wanted
is just a flag saying "don't try to restore data into any table whose
creation command fails".  Maybe that should even be the default ...
and you could extend it to indexes and constraints on such tables too,
as those would likely end up being duplicated as well.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: Config file for psql
Next
From: Andrew Dunstan
Date:
Subject: Re: Config file for psql