Re: updated patch for foreach stmt - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: updated patch for foreach stmt
Date
Msg-id 20110216022043.GF4116@tamriel.snowman.net
Whole thread Raw
In response to Re: updated patch for foreach stmt  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
* Robert Haas (robertmhaas@gmail.com) wrote:
> On Tue, Feb 15, 2011 at 8:44 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > 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.

+1 for this, I don't see it as a big deal, and I would hate to discover
there's some reason we care (I dunno, implicit casts from ARRAY to
hstore ?) in the future that we're not thinking about now.

This also means there's no ambiguity as to what the iterator variable
should be declared as- if you're doing a FOREACH .. ARRAY, then your
iterator is an ARRAY (if it's not a scalar, of course), full stop.
Thanks,
    Stephen

pgsql-hackers by date:

Previous
From: Mark Kirkwood
Date:
Subject: Re: 9.1 (git head) does not compile using --with-libedit-preferred on Ubuntu 10.10
Next
From: Itagaki Takahiro
Date:
Subject: Re: CommitFest 2011-01 as of 2011-02-04