2011/1/29 Stephen Frost <sfr...@snowman.net>: > * Itagaki Takahiro (itagaki.takah...@gmail.com) wrote: >> On Mon, Jan 24, 2011 at 13:05, Stephen Frost <sfr...@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..
I don't see a problem too, but we didn't find a compromise with this syntax, so I left it. It is true, so current implementation of FOR stmt is really baroque and next argument is a compatibility with PL/SQL. My idea is so FOR stmt will be a compatible with PL/SQL original, and FOREACH can be a platform for PostgreSQL specific code. Regards Pavel > > Thanks, > > Stephen > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (GNU/Linux) > > iEYEARECAAYFAk1D/u8ACgkQrzgMPqB3kij2IwCfZ3W+mGc7LedBdnt9lCa0vYjk > m6QAn0xh7r6oTs+T47k+EuwZRpU2T0X8 > =ruBa > -----END PGP SIGNATURE----- > > -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers