Re: REVIEW: WIP: plpgsql - foreach in

Stephen Frost <sfrost@snowman.net>

From: Stephen Frost <sfrost@snowman.net>
To: Itagaki Takahiro <itagaki.takahiro@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>, Pavel Stehule <pavel.stehule@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2011-01-29T11:50:07Z
Lists: 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