[MASSMAIL] Function can not use the 'NEW' variable as a direct parameter inside trigger function?

Поиск
Список
Период
Сортировка
От intmail01
Тема [MASSMAIL] Function can not use the 'NEW' variable as a direct parameter inside trigger function?
Дата
Msg-id CAKJANSC3sJ+aUrPptdh10+KG+eD9p6YHUJ5O-X5yr-+5v2VNZg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Function can not use the 'NEW' variable as a direct parameter inside trigger function?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
Hi,

Why a function can not pass the 'NEW' variable as a direct parameter ?
When I use myFunction(NEW) inside a trigger function an error appears :

pq_driver: [PGRES_FATAL_ERROR]ERROR:  function myFunction(MyTableStruct) does not exist
LINE 1: ...myFunction(NEW)...                                                             ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

I have to use trick by using a temporary variable to run the code :

theVariable MyTableStruct;
theVariable = NEW ;
myFunction(theVariable) ;

Thanks

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Help with error date_trunc() function.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Function can not use the 'NEW' variable as a direct parameter inside trigger function?