Re: How to unnest an array with element indexes

From: AlexK <alkuzo(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: How to unnest an array with element indexes
Date: 2014-02-19 20:55:42
Message-ID: 1392843342351-5792787.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Pavel,

This works for me, thank you!

Presumably foreach is guaranteed to iterate array elements in order: "The
elements are visited in storage order, regardless of the number of array
dimensions", quoted from this:

http://www.postgresql.org/docs/9.2/static/plpgsql-control-structures.html

Since parallelism is coming up, will this behavior stay as documented? My
arrays are as big as 20K-30K elements, maybe more.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/How-to-unnest-an-array-with-element-indexes-tp5792770p5792787.html
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message AlexK 2014-02-19 21:53:24 Re: How to unnest an array with element indexes
Previous Message Tom Lane 2014-02-19 20:16:10 Re: How to unnest an array with element indexes