passing a whole record variable into a SQL command is not implemented

Started by Gaetano Mendolaover 21 years ago1 messages
#1Gaetano Mendola
mendola@bigfoot.com

Hi all,
I'm running our regression test on top of postgresql 7.5 devel.

I found this function not working anymore ( is a distillated ):

create table test ( quota integer );

CREATE OR REPLACE FUNCTION sp_test ( )
RETURNS TEXT AS'
DECLARE
quota RECORD;
my_ret TEXT := '''';
BEGIN
FOR quota IN
SELECT quota
FROM test
LOOP
my_ret := my_ret || quota.quota || '','';
END LOOP;

RETURN my_ret;
END;
' LANGUAGE 'plpgsql'
WITH ( iscachable );

when I execute it I obtain:

ERROR: passing a whole record variable into a SQL command is not
implemented

the problem is that the variable quota have the same column name
for the table test, for us it's a minimum issue due the fact that
is easily fixed changing the variable name, but I'm wondering if
behind there is something wrong.

Regards
Gaetano Mendola