From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | beyaRecords - The home Urban music <uzo(at)beya-records(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Stored procedures |
Date: | 2004-01-02 02:10:21 |
Message-ID: | 2409.1073009421@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
beyaRecords - The home Urban music <uzo(at)beya-records(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Samuel Tardieu | 2004-01-02 16:49:46 | Ambiguous error message |
Previous Message | beyaRecords - The home Urban music | 2004-01-02 01:50:25 | Stored procedures |