Thread: NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
From
Peter Eisentraut
Date:
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
Peter Eisentraut wrote:> Regarding the NOTICE>> CREATE TABLE will create implicit triggers for foreign-key checks>> Doesanyone 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 interestedin are going to be created as a> side effect. But there's nothing that a user can reasonably do with an> implicittrigger for a foreign-key check. ISTM that this notice is about> as interesting as the information that CREATE VIEWwill 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
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
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.
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