From: Andreas Pflug <pgadmin@pse-consulting.de>
To: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: ADD FOREIGN KEY (was Re: [GENERAL] 7.4Beta)
Date: Tue, 30 Sep 2003 15:03:19 +0200
Message-ID: <3F797F17.2090404@pse-consulting.de> (raw)
In-Reply-To: <200309300437.h8U4b7c17142@candle.pha.pa.us>
References: <200309300437.h8U4b7c17142@candle.pha.pa.us>
Bruce Momjian wrote:
>Fact is, folks are doing it anyway by modifying pg_class. I know one
>guy who did it in a transaction so he was the only one to see the
>triggers disabled! The PostgreSQL cookbook page has an example too.
>People are always asking how to do this. Why not just make it setable
>only by the super-user.
>
>FYI, TODO has:
>
> * Allow triggers to be disabled [trigger]
> * With disabled triggers, allow pg_dump to use ALTER TABLE ADD FOREIGN
> KEY
>
For practical reasons, I'd prefer the "disable trigger" not to influence
fk triggers, or at least to have such a default flavor. When restoring a
database, you might consider the data as consistent and complete, so no
triggers and ref checks are needed at all. But in the cases of some kind
of application data import, you might like the data to have fk ref
checked, but don't want to trigger all user triggers.
The implementation of fk checking by triggers should normally be hidden
to the user.
Regards,
Andreas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: pgadmin@pse-consulting.de, pgman@candle.pha.pa.us, tgl@sss.pgh.pa.us
Subject: Re: ADD FOREIGN KEY (was Re: [GENERAL] 7.4Beta)
In-Reply-To: <3F797F17.2090404@pse-consulting.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox