Re: REVIEW: WIP: plpgsql - foreach in
От | Pavel Stehule |
---|---|
Тема | Re: REVIEW: WIP: plpgsql - foreach in |
Дата | |
Msg-id | AANLkTim6xPyP3OV9BPK__r49Ky_59-4rp6+7vbrH6bT8@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: REVIEW: WIP: plpgsql - foreach in (Stephen Frost <sfrost@snowman.net>) |
Ответы |
Re: REVIEW: WIP: plpgsql - foreach in
|
Список | pgsql-hackers |
2011/1/29 Stephen Frost <sfrost@snowman.net>: > * 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.. 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----- > >
В списке pgsql-hackers по дате отправления: