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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: final patch - plpgsql: for-in-array
Дата
Msg-id 12307.1290119376@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: final patch - plpgsql: for-in-array  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: final patch - plpgsql: for-in-array  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
Pavel Stehule <pavel.stehule@gmail.com> writes:
> 2010/11/18 Alvaro Herrera <alvherre@commandprompt.com>:
>> I fail to see how this supports the FOR-IN-array development though.  It
>> will just be another unused construct for most people, no?

> maybe I don't understand well, but patch FOR-IN-ARRAY has a documentation

UNNEST is documented too.  Adding still more features doesn't really
improve matters for people who haven't memorized the documentation;
it only makes it even harder for them to find out what they should be
using.  (More features != better)

To my mind, the complaint about subscripting being slow suggests that we
ought to fix subscripting, not introduce a nonstandard feature that will
make certain use-cases faster if people rewrite their code to use it.

I think it would probably not be terribly hard to arrange forcible
detoasting of an array variable's value the first time it gets
subscripted, for instance.  Of course that only fixes some use-cases;
but it would help, and it helps without requiring people to change their
code.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Latches with weak memory ordering (Re: max_wal_senders must die)
Следующее
От: Andres Freund
Дата:
Сообщение: Re: final patch - plpgsql: for-in-array