passing a whole record variable into a SQL command is not implemented - Mailing list pgsql-hackers

From Gaetano Mendola
Subject passing a whole record variable into a SQL command is not implemented
Date
Msg-id c98joa$4mi$1@floppy.pyrenet.fr
Whole thread Raw
List pgsql-hackers
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




pgsql-hackers by date:

Previous
From: Jonathan Gardner
Date:
Subject: Re: Extended customizing, SQL functions,
Next
From: Gaetano Mendola
Date:
Subject: false infinite recursion detected