passing values to a function

Поиск
Список
Период
Сортировка
От Cedar Cox
Тема passing values to a function
Дата
Msg-id Pine.LNX.4.21.0102181655080.22616-100000@nanu.visionforisrael.com
обсуждение исходный текст
Ответы Re: passing values to a function  (Jan Wieck <janwieck@Yahoo.com>)
Список pgsql-interfaces
Why does this not work?  Am I doing something wrong?

CREATE FUNCTION uutest(text) RETURNS bool AS '
declare varop alias for $1;
begin raise notice '' varop is '',varop; return false;
end;
' LANGUAGE 'plpgsql';

Givingselect uutest('INSERT');
returns

NOTICE:   varop is uutest 
--------f
(1 row)

Has my PG server entered some weird state or something?

One other question.. Is there an easy way to pass an entire record to a
function (eg, the 'new' record)?  Presently I am passing all 12 fields as
separate parameters.

-Cedar



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

Предыдущее
От: Alexaki Sofia
Дата:
Сообщение: speed up creation of a table
Следующее
От: Nico
Дата:
Сообщение: terminal psql: wrong console keystrokes