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

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: final patch - plpgsql: for-in-array
Дата
Msg-id AANLkTimzQsE7LJ6jc8Bi0bXvU9PynU=+zOwBv2X=vRyV@mail.gmail.com
обсуждение исходный текст
Ответ на Re: final patch - plpgsql: for-in-array  (Jaime Casanova <jaime@2ndquadrant.com>)
Ответы Re: final patch - plpgsql: for-in-array  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, Nov 17, 2010 at 7:08 PM, Jaime Casanova <jaime@2ndquadrant.com> wrote:
> On Thu, Sep 30, 2010 at 7:46 AM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
>> Hello
>>
>> this patch implement a new iteration construct - iteration over an
>> array. The sense of this new iteration is:
>>  * a simple and cleaner syntax
>
> i will start the review of this one... but before that sorry for
> suggesting this a bit later but about using UNNEST as part of the
> sintax?

Does for-in-array do what unnset does?  unnest() flattens the whole
array into scalars irregardless of dimensions:
select unnest(array[array[1,2],array[3,4]]);unnest
--------     1     2     3     4


If yes, then +1 (unless there is some other problem) otherwise -1.

merlin


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

Предыдущее
От: Jeroen Vermeulen
Дата:
Сообщение: Re: Indent authentication overloading
Следующее
От: Tom Lane
Дата:
Сообщение: Re: final patch - plpgsql: for-in-array