NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks

Started by Peter Eisentrautover 22 years ago5 messages
#1Peter Eisentraut
peter_e@gmx.net

Regarding the NOTICE

CREATE TABLE will create implicit triggers for foreign-key checks

Does anyone care?

The other "helpful" notices about sequences for serial columns and indexes
for unique constraints have some merit, because they inform the user
objects that the user might be interested in are going to be created as a
side effect. But there's nothing that a user can reasonably do with an
implicit trigger for a foreign-key check. ISTM that this notice is about
as interesting as the information that CREATE VIEW will create an implicit
rule.

--
Peter Eisentraut peter_e@gmx.net

#2Gaetano Mendola
mendola@bigfoot.com
In reply to: Peter Eisentraut (#1)
Re: NOTICE: CREATE TABLE will create implicit triggers for foreign-key

Peter Eisentraut wrote:

Regarding the NOTICE

CREATE TABLE will create implicit triggers for foreign-key checks

Does anyone care?

I don't care but is a way for a beginner to understand that behind
a foreign key there is a TRIGGER that have not a 0 cost.

The other "helpful" notices about sequences for serial columns and

indexes

for unique constraints have some merit, because they inform the user
objects that the user might be interested in are going to be created as a
side effect. But there's nothing that a user can reasonably do with an
implicit trigger for a foreign-key check. ISTM that this notice is about
as interesting as the information that CREATE VIEW will create an

implicit

rule.

I think that this is a particular implementation of Postgres translate a
View on a Rule, am I wrong ?

BTW shall be nice have this kind of "NOTICE", that may be is better call
"INTERNALS", and switchable off.

Regards
Gaetano Mendola

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Peter Eisentraut (#1)
Re: NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks

Peter Eisentraut <peter_e@gmx.net> writes:

Regarding the NOTICE
CREATE TABLE will create implicit triggers for foreign-key checks
Does anyone care?

I was thinking just the other day that it seemed to be useless clutter.

The other "helpful" notices about sequences for serial columns and indexes
for unique constraints have some merit, because they inform the user
objects that the user might be interested in are going to be created as a
side effect.

More to the point, they give the names of the automatically-created
objects. If the FK trigger creation notice included the names of the
triggers then it might have nonzero value. But I'm not sure that people
need to care anymore about the names of the triggers, since there's no
longer much reason to manipulate those triggers. Nowadays you'd
manipulate the FK constraint itself, instead.

I'm in favor of dropping it...

regards, tom lane

#4Stephan Szabo
sszabo@megazone.bigpanda.com
In reply to: Peter Eisentraut (#1)
Re: NOTICE: CREATE TABLE will create implicit triggers

On Wed, 1 Oct 2003, Peter Eisentraut wrote:

Regarding the NOTICE

CREATE TABLE will create implicit triggers for foreign-key checks

Does anyone care?

Probably not anymore. It doesn't give names (as Tom noticed), but at least
it gave a starting point to look for them back when you still had to
interact with them to do things like drop the constraint. I don't think
any of that really applies any longer though.

#5Christopher Kings-Lynne
chriskl@familyhealth.com.au
In reply to: Peter Eisentraut (#1)
Re: NOTICE: CREATE TABLE will create implicit triggers

Peter Eisentraut wrote:

Regarding the NOTICE

CREATE TABLE will create implicit triggers for foreign-key checks

Does anyone care?

I don't.

The other "helpful" notices about sequences for serial columns and indexes
for unique constraints have some merit, because they inform the user
objects that the user might be interested in are going to be created as a
side effect. But there's nothing that a user can reasonably do with an
implicit trigger for a foreign-key check. ISTM that this notice is about
as interesting as the information that CREATE VIEW will create an implicit
rule.

I agree.

Chris