Re: REVIEW: WIP: plpgsql - foreach in

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: REVIEW: WIP: plpgsql - foreach in
Date: 2011-01-29 19:03:45
Message-ID: 20110129190345.GP30352@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2011-01-29 19:05:22 Re: WIP: RangeTypes
Previous Message David E. Wheeler 2011-01-29 19:00:42 Re: WIP: RangeTypes