Re: plpgsql: returning multiple named columns from function

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: plpgsql: returning multiple named columns from function
Дата
Msg-id 21065.1124856936@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: plpgsql: returning multiple named columns from function  (John Lawler <postgresql.org@tgice.com>)
Список pgsql-general
John Lawler <postgresql.org@tgice.com> writes:
> Plus, the main part was to be able to have the columns (arbitrarily)
> named as if they'd been selected from a table.  I hope that there's
> something about as easy as the example I cited from MS SQL.

In existing releases you need to create a named composite type (row
type) and declare the function as returning that type.  PG 8.1 will
provide some syntactic sugar for this in the form of OUT parameters.
There are examples in the docs ...

            regards, tom lane

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

Предыдущее
От: Jeff Eckermann
Дата:
Сообщение: Re: ctid access is slow
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: ctid access is slow