Re: Stored procedures - Mailing list pgsql-sql

From Tom Lane
Subject Re: Stored procedures
Date
Msg-id 2409.1073009421@sss.pgh.pa.us
Whole thread Raw
In response to Stored procedures  (beyaRecords - The home Urban music <uzo@beya-records.com>)
List pgsql-sql
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


pgsql-sql by date:

Previous
From: beyaRecords - The home Urban music
Date:
Subject: Stored procedures
Next
From: Samuel Tardieu
Date:
Subject: Ambiguous error message