beyaRecords - The home Urban music <uzo@beya-records.com> writes:
> I am having problems with a stored procedure (plpgsql) that takes in a
> value and returns a record set.
> I am calling the procedure as follows:
> select clientRec('tmpg60');
Use
select * from clientRec('tmpg60') as (column list);
If you declare the function as returning RECORD, you will need to
provide an AS clause that identifies the column set the records will
contain. Without this, the parser has no idea what to expand "*" to.
See the example in section 7.2.1.4 here:
http://www.postgresql.org/docs/7.4/static/queries-table-expressions.html
regards, tom lane