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


Wed, 1 Oct 2003 12:34:19 +0200 (CEST)
Peter Eisentraut <peter_e@gmx.net>
NOTICE:  CREATE TABLE will create implicit triggers for foreign-key
	checks
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


Wed, 01 Oct 2003 15:30:32 +0200
Gaetano Mendola <mendola@bigfoot.com>
Re: NOTICE: CREATE TABLE will create implicit triggers for
 foreign-key
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

Wed, 01 Oct 2003 10:31:22 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: NOTICE: CREATE TABLE will create implicit triggers for
	foreign-key checks
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.


Wed, 1 Oct 2003 07:53:08 -0700 (PDT)
Stephan Szabo <sszabo@megazone.bigpanda.com>
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



Thu, 02 Oct 2003 09:44:49 +0800
Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Re: NOTICE:  CREATE TABLE will create implicit triggers