Skip site navigation (1) Skip section navigation (2)

Re: final patch - plpgsql: for-in-array

From: Jaime Casanova <jaime(at)2ndquadrant(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: final patch - plpgsql: for-in-array
Date: 2010-11-18 00:08:58
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Thu, Sep 30, 2010 at 7:46 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
> Hello
> this patch implement a new iteration construct - iteration over an
> array. The sense of this new iteration is:
>  * a simple and cleaner syntax

i will start the review of this one... but before that sorry for
suggesting this a bit later but about using UNNEST as part of the

FOR var IN UNNEST array_expr LOOP

i like this because:
1) is cleaner when array_expr is ARRAY[1,2,3]
2) is not legal now to use the unnest() function without a SELECT in
the context of a FOR loop (or am i missing something?)
3) the unnest() function does the same so seems intuitive what a

what i don't know if is this syntax could co-exist with the unnest() function?

Jaime Casanova
Professional PostgreSQL: Soporte y capacitación de PostgreSQL

In response to


pgsql-hackers by date

Next:From: Jeff JanesDate: 2010-11-18 01:09:33
Subject: Re: CommitFest 2010-11: Call for Reviewers
Previous:From: Tom LaneDate: 2010-11-17 23:52:47
Subject: Re: We need to log aborted autovacuums

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group