Re: pg_restore and create FK without verification check

From: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: pg_restore and create FK without verification check
Date: 2003-11-26 17:43:19
Message-ID: 3FC4E637.3020509@pse-consulting.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greg Stark wrote:

>If I could disable and reenable the constraint the danger that I would get the
>definition wrong would be eliminated. And if I had already done the work to
>ensure there were no broken relationships I would optionally be able to skip
>the redundant automatic check. I could even have done the verification myself
>while the data wasn't live for example.
>
>

Since FKs are implemented as trigger, you could disable all triggers on
the table right now, no? Could be a bit more comfortable, I agree, and
hope for an upcoming DISABLE TRIGGER command.

While talking about this: I could add ENABLE/DISABLE TRIGGER
functionality to pgadmin3. Unfortunately, on pg_trigger.tgenabled
there's still the comment "not presently checked everywhere it should
be, so disabling a trigger by setting this to false does not work
reliably". I wonder if this is still true for 7.4. I can't imagine that
this should be so hard to fix.

Regards,
Andreas

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-11-26 17:52:39 Re: pg_restore and create FK without verification check
Previous Message Oli Sennhauser 2003-11-26 17:40:18 Re: Size on Disk