Re: Reconstructing FKs in pg_dump

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Reconstructing FKs in pg_dump
Date: 2002-09-26 22:44:43
Message-ID: 20020926154249.S30187-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Thu, 26 Sep 2002, Tom Lane wrote:

> Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> writes:
> >> However, if we are going to put that kind of knowledge into pg_dump,
> >> it would only be a small further step to have it dump these triggers
> >> as ALTER TABLE ADD CONSTRAINT commands instead. Which would be a lot
> >> better for forward compatibility than dumping the raw triggers.
>
> > Wasn't there still some question about the fact that ATAC causes a
> > check of the constraint which for large tables is not insignificant.
> > I don't remember if there was any consensus on how to deal with that.
>
> Hmm, good point. That's probably why we didn't go ahead and do it
> already...
>
> Maybe we should just put the lookup hack into the backend's CREATE
> CONSTRAINT TRIGGER code and leave it at that.

That seems reasonable. And probably not too hard. There might still
be cases where we can't get it, and I think we probably should at least
throw a notice on the create in that case, the admin will *probably*
ignore it, but if they want to fix the situation right away they can.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Doug McNaught 2002-09-26 23:26:03 Re: [HACKERS] Performance while loading data and indexing
Previous Message Bruce Momjian 2002-09-26 22:30:53 Re: Bug in PL/pgSQL GET DIAGNOSTICS?