Re: REVIEW: WIP: plpgsql - foreach in - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: REVIEW: WIP: plpgsql - foreach in
Date
Msg-id 20110129115007.GI30352@tamriel.snowman.net
Whole thread Raw
In response to Re: REVIEW: WIP: plpgsql - foreach in  (Itagaki Takahiro <itagaki.takahiro@gmail.com>)
Responses Re: REVIEW: WIP: plpgsql - foreach in  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
* Itagaki Takahiro (itagaki.takahiro@gmail.com) wrote:
> On Mon, Jan 24, 2011 at 13:05, Stephen Frost <sfrost@snowman.net> wrote:
> > FOR var in ARRAY array_expression ...
> >
> > I like that a lot more than inventing a new top-level keyword,
>
> AFAIR, the syntax is not good at an array literal.
>   FOR var IN ARRAY ARRAY[1,2,5] LOOP ...

I don't really see why that's "not good"?  So you have 'ARRAY' twice..
So what?  That's better than having a new top-level FOREACH that doesn't
have any reason to exist except to be different from FOR and to not do
the same thing..
Thanks,
    Stephen

pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Snapshots no longer build
Next
From: Stephen Frost
Date:
Subject: Re: REVIEW: WIP: plpgsql - foreach in