Re: rule calls function, passing OLD - Mailing list pgsql-novice

From Tom Lane
Subject Re: rule calls function, passing OLD
Date
Msg-id 26535.1089815350@sss.pgh.pa.us
Whole thread Raw
In response to rule calls function, passing OLD  (R.Welz <linuxprodukte@gmx.de>)
List 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 by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: rule calls function, passing OLD
Next
From: Tom Lane
Date:
Subject: Re: Extended query: prepared statements list?