Re: way to pass NEW into function

Поиск
Список
Период
Сортировка
От Larry Rosenman
Тема Re: way to pass NEW into function
Дата
Msg-id 20010710.21383800@ler-freebie.iadfw.net
обсуждение исходный текст
Ответ на way to pass NEW into function  (Mike Cianflone <mcianflone@littlefeet-inc.com>)
Список 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@littlefeet-inc.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@postgresql.org


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Vince Vielhaber
Дата:
Сообщение: Re: grant and SQL92
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: Strange query execution time