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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: proposal: FOREACH-IN-ARRAY (probably for 9.2?)
Date: 2010-12-17 15:47:38
Message-ID: 180.1292600858@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> I am resending a redesigned proposal about special plpgsql statement
> that support iteration over an array.

OK ...

> == Iteration over multidimensional arrays ==
> Its designed to reduce one dimension from source array. It can remove
> a slicing and simplify code:

This seems like a really bad, confusing idea. I think it should throw
a type-mismatch error in this case. If there is any use-case for such a
thing, which I'm quite unconvinced of, it ought to use a separate syntax
rather than overloading the element-by-element syntax.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2010-12-17 15:49:59 Serializable lock consistency (was Re: CommitFest wrap-up)
Previous Message Pavel Stehule 2010-12-17 15:41:50 Re: patch: remove redundant code from pl_exec.c