Re: updated patch for foreach stmt
От | Andrew Dunstan |
---|---|
Тема | Re: updated patch for foreach stmt |
Дата | |
Msg-id | 4D5B401A.3020807@dunslane.net обсуждение исходный текст |
Ответ на | Re: updated patch for foreach stmt (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: updated patch for foreach stmt
|
Список | pgsql-hackers |
On 02/15/2011 08:59 PM, Robert Haas wrote: > On Tue, Feb 15, 2011 at 8:44 PM, Tom Lane<tgl@sss.pgh.pa.us> wrote: >> Robert Haas<robertmhaas@gmail.com> writes: >>> On Tue, Feb 8, 2011 at 3:26 PM, Stephen Frost<sfrost@snowman.net> wrote: >>>> Alright, so, like I said, I really like this feature and would like to >>>> see it included. >>> Amen to that! >>> I think the syntax Tom suggested before was FOREACH thingy IN ARRAY >>> arr rather than just FOREACH thingy IN arr. >> Actually, I'm on record as saying the opposite: we shouldn't need to >> distinguish the exact data type at the syntax level, so long as the >> FOREACH construct is understood to mean "iterate through the members of >> the composite object produced by this expression": >> >> http://archives.postgresql.org/pgsql-hackers/2010-12/msg01579.php >> >> I am not, however, wedded to that position --- if people are happier >> with explicit use of ARRAY here, I won't fight hard to get rid of it. >> >> Anyway I'm going to start on this patch next, so last chance for >> opinions about the syntax ... > Oh, I was looking at this one: > > http://archives.postgresql.org/pgsql-hackers/2010-12/msg01557.php > > Anyhoo, forcing the explicit ARRAY keyword in there seems like pretty > cheap future-proofing to me. YMMV. > If this is the syntax that makes you do things like: FOREACH foo IN ARRAY ARRAY[1,2,3] I have to say I find that pretty darn ugly still. cheers andrew
В списке pgsql-hackers по дате отправления: