John Hansen posted a C implementaion of the UNNEST function that does
this. It is in the archives here:
http://archives.postgresql.org/pgsql-hackers/2004-11/msg00158.php and
http://archives.postgresql.org/pgsql-hackers/2004-11/msg00327.php .
I've been using it for the last few months and it's be
I have a function to convert a single dimension array to a row set
CREATE OR REPLACE FUNCTION arraytotable(anyarray)
RETURNS SETOF anyelement AS
'
DECLARE
theData ALIAS FOR $1;
count integer;
start integer;
BEGIN
start :=array_lower(theData,1);
count :=array_upper(theData,1);