Skip site navigation (1) Skip section navigation (2)

Re: rule calls function, passing OLD

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "R(dot)Welz" <linuxprodukte(at)gmx(dot)de>
Cc: Postgesql list <pgsql-novice(at)postgresql(dot)org>
Subject: Re: rule calls function, passing OLD
Date: 2004-07-14 14:29:10
Message-ID: 26535.1089815350@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-novice
"R.Welz" <linuxprodukte(at)gmx(dot)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

In response to

pgsql-novice by date

Next:From: Tom LaneDate: 2004-07-14 14:37:32
Subject: Re: Extended query: prepared statements list?
Previous:From: Stephan SzaboDate: 2004-07-14 14:26:17
Subject: Re: rule calls function, passing OLD

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group