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

From darcy@druid.net (D'Arcy J.M. Cain)
Subject Re: Changes to functions and triggers
Date
Msg-id m1334b6-000AY3C@druid.net
Whole thread Raw
In response to Re: Changes to functions and triggers  (Thomas Lockhart <lockhart@alumni.caltech.edu>)
List pgsql-hackers
Thus spake Thomas Lockhart
> > 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');
> 
> What if you leave out the quotes on the last line above, so the column
> names are actually visible? It looks like the example in the docs might
> be a poor choice since the function is intended to manipulate columns,
> so the text representation of the column name is being passed in.
> 
> Don't know if that is the source of your trouble though...

Nope.  I added that after reading the web page but without them it still
has the problem.

-- 
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: "Ross J. Reedstrom"
Date:
Subject: Re: Big 7.1 open items
Next
From: Tom Lane
Date:
Subject: Re: planner question re index vs seqscan