Re: proposal: FOREACH-IN-ARRAY (probably for 9.2?)

David Wheeler <david@kineticode.com>

From: "David E. Wheeler" <david@kineticode.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andrew Dunstan <andrew@dunslane.net>, Pavel Stehule <pavel.stehule@gmail.com>, Itagaki Takahiro <itagaki.takahiro@gmail.com>, Merlin Moncure <mmoncure@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2010-12-17T18:20:28Z
Lists: pgsql-hackers
On Dec 17, 2010, at 9:31 AM, Tom Lane wrote:

> Well, we did beat up Pavel over trying to shoehorn this facility into
> the existing FOR syntax, so I can hardly blame him for thinking this
> way.  The question is whether we're willing to assume that FOREACH will
> be limited to iterating over arrays, meaning we'll be stuck with
> inventing yet another initial keyword if some other fundamentally
> different concept comes along.  Right at the moment I can't think of
> any plausible candidates, but ...

    FOREACH pair IN HSTORE…

David