Changes to functions and triggers - Mailing list pgsql-hackers

From darcy@druid.net (D'Arcy J.M. Cain)
Subject Changes to functions and triggers
Date
Msg-id m132vTP-000AY3C@druid.net
Whole thread Raw
Responses Re: Changes to functions and triggers
List pgsql-hackers
Something changed in 7.02 from 6.3.  I used to do this:

CREATE FUNCTION make_date()     RETURNS opaque   AS '/usr/pgsql/modules/make_date.so'    LANGUAGE 'c';
CREATE TRIGGER make_edate   BEFORE INSERT OR UPDATE ON bgroup   FOR EACH ROW   EXECUTE PROCEDURE make_date(edate, aniv,
emon,eyear);   
 

This no longer works.  I looked and the docs and it seems that this
should work instead.

CREATE FUNCTION make_date(date, int, int, int)     RETURNS opaque   AS '/usr/pgsql/modules/make_date.so'    LANGUAGE
'c';
CREATE TRIGGER make_edate   BEFORE INSERT OR UPDATE ON bgroup   FOR EACH ROW   EXECUTE PROCEDURE make_date('edate',
'aniv','emon', 'eyear');   
 

But this gives me;

ERROR:  CreateTrigger: function make_date() does not exist

Is this broken now or am I not understanding the documentation?  Why
is it looking for a make_date that takes no args?

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Big 7.1 open items
Next
From: Ryan Kirkpatrick
Date:
Subject: Re: Call for port testing on fmgr changes