Re: stored procedure: RETURNS record

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: stored procedure: RETURNS record
Дата
Msg-id 10079.1253917884@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: stored procedure: RETURNS record  (Rob Marjot <rob@marjot-multisoft.com>)
Список pgsql-general
Rob Marjot <rob@marjot-multisoft.com> writes:
> Any thoughts on how to make sure multiple columns are returned; without
> specifying this in the function's prototype return clause?

If you want "SELECT * FROM" to expand to multiple columns, the names
and types of those columns *must* be available at parse time.  You
can either declare them in the function prototype, or you can supply
them in the function call, a la

    select * from my_func(...) as x(a int, b int);

It will not work to hope that the parser can predict what the function
will do when executed.

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Steve Crawford
Дата:
Сообщение: pg_restore ordering questions
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_restore ordering questions