Re: Review: UNNEST (and other functions) WITH ORDINALITY

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Review: UNNEST (and other functions) WITH ORDINALITY
Дата
Msg-id 51F67D97.2090109@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: Review: UNNEST (and other functions) WITH ORDINALITY  (Greg Stark <stark@mit.edu>)
Список pgsql-hackers
On 07/29/2013 08:02 PM, Greg Stark wrote:
>> > Unless LATERAL provides a way to do lock-step iteration through a pair
>> > (or more) of functions I don't think we can get rid of SRFs [in select target lists] yet
> You don't even need lateral. This works fine:
> 
> postgres=# select * from generate_series(1,10) with ordinality as

Exactly - that's why the previous paragraph was:

>> As far as I can tell LATERAL won't help with this; you'd need unnest
>> WITH ORDINALITY then a join on the ordinal, or you'd need full support
>> for SQL UNNEST with multiple array arguments.

;-)

I'm interested to see that it might be possible to evaluate multiple
"WITH ORDINALITY" SRFs in FROM together rather than having to perform a
join. That'd make it a much saner replacement for SRFs in the SELECT list.

-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: Marti Raudsepp
Дата:
Сообщение: Re: Bison 3.0 updates
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Bison 3.0 updates