Re: REVIEW: WIP: plpgsql - foreach in - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: REVIEW: WIP: plpgsql - foreach in
Date
Msg-id 20110129190345.GP30352@tamriel.snowman.net
Whole thread Raw
In response to Re: REVIEW: WIP: plpgsql - foreach in  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: REVIEW: WIP: plpgsql - foreach in  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> See also
> http://archives.postgresql.org/pgsql-hackers/2010-12/msg01579.php
> which tries to draw a clear distinction between what FOR does and what
> FOREACH does.

Thanks for that, somehow I had missed that post previously.  I think I
can get behind the idea of FOREACH being used for 'vertical'
(multi-value in a single value) loops while FOR is used for 'horizontal'
(multi-row).  This patch certainly needs to be improved to document
this, in the grammar, in the code via comments, and in the actual
documentation.  It also needs to touch any place that talks about the
other kinds of loops to be sure that FOREACH is included and that it's
behavior is documented accordingly.
Thanks again,
    Stephen

pgsql-hackers by date:

Previous
From: "David E. Wheeler"
Date:
Subject: Re: WIP: RangeTypes
Next
From: Jeff Davis
Date:
Subject: Re: WIP: RangeTypes