Re: Proposal: plpgsql - "for in array" statement

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: plpgsql - "for in array" statement
Date: 2010-09-28 20:49:29
Message-ID: AANLkTi=xH=VJmU9u5hZ5d_XS1RSOt1LhMywyGTS24fjk@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Sep 28, 2010 at 4:39 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
> 2010/9/28 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
>> Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
>>> 2010/9/28 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
>>>> As an example, is this a for-in-query or a
>>>> for-in-array?
>>>>
>>>>        FOR v IN (SELECT arraycol FROM tab) LOOP ...
>>
>>> This is a subquery - so it is a for-in-array - should return one row
>>> with one column.
>>
>> That's not obvious at all.  It's legal right now to write that, and it
>> will be interpreted as for-in-query.
>
> but it has not a sense.

It has a very fine sense. It's completely obvious to me what that
means, and you're proposing to break it. In a word: no.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2010-09-28 21:03:15 Commitfest: The Good, The Bad, and the Ugly
Previous Message Pavel Stehule 2010-09-28 20:41:19 Re: Proposal: plpgsql - "for in array" statement