Re: Adding an ignore list to pg_restore, prototype patch #1

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martin Pitt <mpitt(at)debian(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org, Stephen Frost <sfrost(at)snowman(dot)net>
Subject: Re: Adding an ignore list to pg_restore, prototype patch #1
Date: 2006-02-25 17:18:39
Message-ID: 11637.1140887919@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Martin Pitt <mpitt(at)debian(dot)org> writes:
> Martin Pitt [2006-02-19 14:39 +0100]:
>> Since this changes the behaviour of pg_restore, this should probably
>> become an option, e. g. -D / --ignore-existing-table-data. I'll do
>> this if you agree to the principle of the current patch.

> I improved the patch now to only ignore TABLE DATA for existing tables
> if '-X ignore-existing-tables' is specified. I also updated the
> documentation.

This patch is unbelievably ugly and probably vulnerable to coredumps.
Please use a cleaner way of disabling the subsequent load than tromping
all over the TOC datastructure, ie, not this:

> + strcpy (tes->desc, "IGNOREDATA");

BTW, I'm pretty sure it fails for tables with same names in different
schemas, too.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jaime Casanova 2006-02-25 18:15:04 Re: textToQualifiedNameList second parameter
Previous Message Alvaro Herrera 2006-02-25 16:47:53 Re: Adding an ignore list to pg_restore, prototype p.tch #1