Re: Changed SRF in targetlist handling

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Changed SRF in targetlist handling
Дата
Msg-id 20160822190101.5r3thmffjl62tn3f@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: Changed SRF in targetlist handling  (Craig Ringer <craig@2ndquadrant.com>)
Список pgsql-hackers
Hi,

On 2016-05-23 09:26:03 +0800, Craig Ringer wrote:
> SRFs-in-tlist are a lot faster for lockstep iteration etc. They're also
> much simpler to write, though if the result result rowcount differs
> unexpectedly between the functions you get exciting and unexpected
> behaviour.
> 
> WITH ORDINALITY provides what I think is the last of the functionality
> needed to replace SRFs-in-from, but at a syntatactic complexity and
> performance cost. The following example demonstrates that, though it
> doesn't do anything that needs LATERAL etc. I'm aware the following aren't
> semantically identical if the rowcounts differ.

I think here you're just missing ROWS FROM (generate_series(..), generate_series(...))

Andres



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Exporting more function in libpq
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Bug in abbreviated keys abort handling (found with amcheck)