Re: rule calls function, passing OLD

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: rule calls function, passing OLD
Дата
Msg-id 26535.1089815350@sss.pgh.pa.us
обсуждение исходный текст
Ответ на rule calls function, passing OLD  (R.Welz <linuxprodukte@gmx.de>)
Список pgsql-novice
"R.Welz" <linuxprodukte@gmx.de> writes:
> CREATE OR REPLACE FUNCTION deny_namen_telefonverweise(record) RETURNS
> void AS '
> ...
>     LANGUAGE 'plpgsql';

You can't do that.  CVS tip tells you so immediately:
    ERROR:  plpgsql functions cannot take type record
but I think 7.4 wouldn't notice until you try to execute the function.

You could declare the function as taking the specific rowtype of the
table, though:

CREATE OR REPLACE FUNCTION deny_namen_telefonverweise(Namen_Telefonverweise) RETURNS

Notice that the error message you're getting is specifically complaining
about the lack of such a function.

            regards, tom lane

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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: rule calls function, passing OLD
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Extended query: prepared statements list?