Re: Changes to functions and triggers - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Changes to functions and triggers
Date
Msg-id 1692.961530135@sss.pgh.pa.us
Whole thread Raw
In response to Re: Changes to functions and triggers  (darcy@druid.net (D'Arcy J.M. Cain))
List pgsql-hackers
darcy@druid.net (D'Arcy J.M. Cain) writes:
>> You sure you didn't fall into the same old trap of you-must-create-
>> the-trigger-after-the-function?  If you drop and recreate the function,
>> it has a new OID, so you have to drop and recreate the trigger because
>> it links to the function by OID.

> Positive.  I dropped both then did the above in the order shown.

Hm.  Is the OID shown in the error message the correct OID for your
trigger function, or not?  (Try "select oid,* from pg_proc where
proname = 'make_date'", maybe also "select * from pg_proc where
oid = 24224")

There are trigger examples in the regress tests that are hardly
different from your example, so the trigger feature is surely not
broken completely.  Maybe a platform-specific problem?  Which
version were you running again, exactly, and what configuration
options?  BTW, do the regress tests pass for you?
        regards, tom lane


pgsql-hackers by date:

Previous
From: darcy@druid.net (D'Arcy J.M. Cain)
Date:
Subject: Re: Changes to functions and triggers
Next
From: Brook Milligan
Date:
Subject: table permissions and referential integrity