Re: Stored procedures

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Stored procedures
Дата
Msg-id 2409.1073009421@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Stored procedures  (beyaRecords - The home Urban music <uzo@beya-records.com>)
Список 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 по дате отправления:

Предыдущее
От: beyaRecords - The home Urban music
Дата:
Сообщение: Stored procedures
Следующее
От: Samuel Tardieu
Дата:
Сообщение: Ambiguous error message