Re: final patch - plpgsql: for-in-array

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: final patch - plpgsql: for-in-array
Дата
Msg-id 4CE54DB7.9050800@dunslane.net
обсуждение исходный текст
Ответ на Re: final patch - plpgsql: for-in-array  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: final patch - plpgsql: for-in-array  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers

On 11/18/2010 10:33 AM, Robert Haas wrote:
> On Thu, Nov 18, 2010 at 10:24 AM, Merlin Moncure<mmoncure@gmail.com>  wrote:
>>
>> Pavel's performance argument is imnsho valid. arrays at present are
>> the best way to pass data around functions and any optimizations here
>> are very welcome.  Given that, is there any way to mitigate your
>> concerns on the syntax side?
> Can we get the performance benefit any other way?  I hate to think
> that it will still be slow for people using the already-supported
> syntax.

It's not disastrously slower. AFAICT from a very quick glance over the 
patch, he's getting the speedup by bypassing the normal mechanism for 
evaluating "for x in select ...". So we'd have to special-case that to 
trap calls to unnest in the general form. That would be pretty ugly. Or 
else make unnest and SPI faster. But that's a much bigger project.

Syntactic sugar is not entirely to be despised, anyway.

cheers

andrew


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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: final patch - plpgsql: for-in-array
Следующее
От: Cédric Villemain
Дата:
Сообщение: Re: final patch - plpgsql: for-in-array