Re: UNNEST with multiple args, and TABLE with multiple funcs

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: UNNEST with multiple args, and TABLE with multiple funcs
Дата
Msg-id 28893.1385001768@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: UNNEST with multiple args, and TABLE with multiple funcs  (David Johnston <polobo@yahoo.com>)
Список pgsql-hackers
David Johnston <polobo@yahoo.com> writes:
> Tom Lane-2 wrote
>> We could conceivably say that we'll implicitly UNNEST() if the function
>> returns array, and not otherwise --- but that seems pretty inconsistent
>> and surprise-making to me.  I'm not too sure what to do if a function
>> returns setof array, either.

> If a function returns a scalar array (RETURNS text[]) we would unnest the
> array per-spec.  If it returns a set (RETURN setof anything {including a
> single array}) we would not unnest it since set returning functions are
> non-spec - instead we'd use our SRF processing routine.  If the function
> returns a scalar non-array the implicit single-row returned by the function
> would be output.

I find that way too inconsistent to be a sane specification.
        regards, tom lane



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

Предыдущее
От: David Johnston
Дата:
Сообщение: Re: UNNEST with multiple args, and TABLE with multiple funcs
Следующее
От: David Johnston
Дата:
Сообщение: Re: UNNEST with multiple args, and TABLE with multiple funcs