Re: passing new/old record in pl/pgsql trigger functions to other functions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: passing new/old record in pl/pgsql trigger functions to other functions
Дата
Msg-id 13912.1085984096@sss.pgh.pa.us
обсуждение исходный текст
Ответ на passing new/old record in pl/pgsql trigger functions to other functions  (basic <basic@mozdev.org>)
Список pgsql-sql
basic <basic@mozdev.org> writes:
>    In Postgresql version 7.4.1 How does one pass new/old record in a 
> pl/pgsql trigger function to other functions?

You can't ... NEW and OLD are of unspecified-record types, and there's
no support for passing such things to other functions.  You pretty much
have to do the tedious "myfunc(NEW.f1, NEW.f2, ...)".

I've done some work recently to improve the support for passing record
types around as full-fledged datatypes.  The above still doesn't quite
work, and I can't promise that it'll get done for 7.5, but hopefully by
the release after that it will.
        regards, tom lane


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

Предыдущее
От: basic
Дата:
Сообщение: passing new/old record in pl/pgsql trigger functions to other functions
Следующее
От: sad
Дата:
Сообщение: type regclass casting