No description or website provided.
C
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
doc
sql
src
test
License
META.json
Makefile
README.md
unnest_ordinality.control

README.md

unnest_ordinality PostgreSQL Extension

Efficiently turn a Postgres array into a set of (element_number, array_element) pairs.

Should work with just about any modern version of PostgreSQL. Mainly tested with Release 9.2.

Building

make
make install

Using

andrew# create extension unnest_ordinality;

andrew=# select * from unnest_ordinality('{a,b,c,d,e,f,g}'::text[]);
 element_number | element 
----------------+---------
              1 | a
              2 | b
              3 | c
              4 | d
              5 | e
              6 | f
              7 | g