Re: updated patch for foreach stmt

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Takahiro Itagaki <itagaki(dot)takahiro(at)gmail(dot)com>
Subject: Re: updated patch for foreach stmt
Date: 2011-02-16 01:59:18
Message-ID: AANLkTims3goKXMJSkKhn9JfMo5s2K5aq4FRt6s-FChCJ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Feb 15, 2011 at 8:44 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Tue, Feb 8, 2011 at 3:26 PM, Stephen Frost <sfrost(at)snowman(dot)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.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-02-16 02:04:28 Re: contrib loose ends: 9.0 to 9.1 incompatibilities
Previous Message Tom Lane 2011-02-16 01:54:45 Re: 9.1 (git head) does not compile using --with-libedit-preferred on Ubuntu 10.10