Re: Returning composite types from a plpgsql function

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Returning composite types from a plpgsql function
Дата
Msg-id 22683.1020464641@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Returning composite types from a plpgsql function  (Joseph Barillari <jbarilla@princeton.edu>)
Список pgsql-sql
Joseph Barillari <jbarilla@princeton.edu> writes:
> Unfortunately, when I execute this, I get:

> cal=3D> select frob();
>    frob=20=20=20=20
> -----------
>  172795360
> (1 row)

You can't do anything useful with a rowtype function result except
select a single field from it.  The manual's discussion for SQL
functions also applies to PL-language functions:
http://www.ca.postgresql.org/users-lounge/docs/7.2/postgres/xfunc-sql.html#AEN26354

There is work afoot to allowSELECT ... FROM function(...)
which would make functions returning rowtypes a whole lot more useful.
        regards, tom lane


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

Предыдущее
От: Joseph Barillari
Дата:
Сообщение: Returning composite types from a plpgsql function
Следующее
От: Jakub Ouhrabka
Дата:
Сообщение: difficult query