unnest - Mailing list pgsql-hackers

From John Hansen
Subject unnest
Date
Msg-id 5066E5A966339E42AA04BA10BA706AE561FB@rodrick.geeknet.com.au
Whole thread Raw
Responses Re: unnest
Re: unnest
Re: unnest
Re: unnest
List pgsql-hackers
Attached, array -> rows iterator.

select * from unnest(array[1,2,3,4,5]);

Unnest
---------------
 1
 2
 3
 4
 5
5 rows

The switch statement could probably be done in a different way, but
there doesn't seem to be any good examples of how to return anyitem. If
anyone have a better way, please let me know.

Does anyone know how to check individual array elements for NULL values?
PG_ARG_ISNULL() seems to return true if ANY array element is null; ex::
array[1,2,3,null,4,5]

Comments / improvements welcome.

Kind regards,

John


Attachment

pgsql-hackers by date:

Previous
From: David Helgason
Date:
Subject: Re: CVS should die (was: Possible make_oidjoins_check ...)
Next
From: Gaetano Mendola
Date:
Subject: Re: [pgsql-www] pg_autovacuum is nice ... but ...