Re: looking for an array-extract-item-as-it operator - Mailing list pgsql-hackers

From Tom Lane
Subject Re: looking for an array-extract-item-as-it operator
Date
Msg-id 14748.1452120648@sss.pgh.pa.us
Whole thread Raw
In response to looking for an array-extract-item-as-it operator  (Peter Krauss <ppkrauss@gmail.com>)
List pgsql-hackers
Peter Krauss <ppkrauss@gmail.com> writes:
> I need to access an array-item from an array of arrays.

Multi-dimensional arrays in Postgres are not "arrays of arrays".
If you persist in thinking they are, it's mostly going to lead you
astray about what will work or not.

Having said that, you might find that plpgsql's 
FOREACH ... SLICE ... IN ARRAY ... LOOP
construct would help you, if you need to iterate through the
rows sequentially.

http://www.postgresql.org/docs/9.4/static/plpgsql-control-structures.html#PLPGSQL-FOREACH-ARRAY
        regards, tom lane



pgsql-hackers by date:

Previous
From: Peter Krauss
Date:
Subject: looking for an array-extract-item-as-it operator
Next
From: Jim Nasby
Date:
Subject: Re: No Issue Tracker - Say it Ain't So!