Re: set returning function

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: set returning function
Дата
Msg-id 29320.1115658142@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: set returning function  (Dennis Bjorklund <db@zigo.dhs.org>)
Список pgsql-bugs
Dennis Bjorklund <db@zigo.dhs.org> writes:
> Is
>    SELECT 42, srf();
> the same as
>    SELECT 42, * FROM srf();
> ?

No.

> In my view the first version is an error. It's not like you can put a
> normal table in the select list, so why can we put a set returning
> function there? Ie, is it really a feature?

To some extent it's a hangover from PostQUEL ... but there are things
you can do with it that you can't currently do with SRFs in FROM.
See for instance the "listchildren" example in the manual:
http://www.postgresql.org/docs/8.0/static/xfunc-sql.html#AEN29503

            regards, tom lane

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

Предыдущее
От: Dennis Bjorklund
Дата:
Сообщение: Re: set returning function
Следующее
От: "Emanuel Brokmann"
Дата:
Сообщение: BUG #1655: trapping errors doesn't work