passing values to a function - Mailing list pgsql-interfaces

From Cedar Cox
Subject passing values to a function
Date
Msg-id Pine.LNX.4.21.0102181655080.22616-100000@nanu.visionforisrael.com
Whole thread Raw
Responses Re: passing values to a function
List 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 by date:

Previous
From: Alexaki Sofia
Date:
Subject: speed up creation of a table
Next
From: Nico
Date:
Subject: terminal psql: wrong console keystrokes