From: | Larry Rosenman <ler(at)lerctr(dot)org> |
---|---|
To: | Mike Cianflone <mcianflone(at)littlefeet-inc(dot)com> |
Cc: | "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: way to pass NEW into function |
Date: | 2001-07-10 21:38:38 |
Message-ID: | 20010710.21383800@ler-freebie.iadfw.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
What I did in a similar trigger was set a variable (of type RECORD) to
NEW and then use that.
(I actually used the appropriate fields, but record should... work)
LER
>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<
On 7/10/01, 4:22:34 PM, Mike Cianflone <mcianflone(at)littlefeet-inc(dot)com>
wrote regarding [HACKERS] way to pass NEW into function:
> Is it possible to trick pg/sql to allow passing of the NEW record
> into a function? I've got a trigger that gets kicked off before an insert
> and I need to call another function and pass that record in, but doing a
> perform activate_event(NEW); /* my function is activate_event(OPAQUE) */
> only spits out "ERROR: NEW used in non-rule query". Is there a way to
trick
> it into passing the NEW record into my function?
> Thanks for any pointers,
> Mike
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2001-07-10 21:38:51 | Re: timestamp with/without time zone |
Previous Message | Rachit Siamwalla | 2001-07-10 21:37:22 | varchar vs. text |