arrays - Mailing list pgsql-hackers

From ivan
Subject arrays
Date
Msg-id Pine.LNX.4.56.0307272234060.31026@rex.anfa.pl
Whole thread Raw
Responses Re: arrays  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
hi :>

i wrote function to change array to setof record, because better is
working with tuples .

http://www.psycho.pl/public/src/pgsql/array.tar.bz2

i will very glade when you check this , because im afraid thed i make same
mistakes .. (if its good ist could be added to contrib/array as one more
funciton)

its good to select like this (im writing from mem, not coping so sorry for
mistakes in names)

SELECT * FROM pg_catalog.pg_type t inner join pg_catalog.pg_namespace n ON
(t.typnamespace=n.oid) WHERE pg_type = 'my_type' AND n.nspname IN (SELECT
a FROM ( array_to_setof(current_schemas()) ) s (schema name));

declaration is setof record array_to_setof ( anyarray);

i trayed created it like "any" array_to_setof( anyarray) but i had problem
with select. i also trying write setof_to_array as aggregate, but i have
problem with returns type , because aggregate cat have 'anyarray' as
result ;(

thx for your opionion.
bye


pgsql-hackers by date:

Previous
From: "Mendola Gaetano"
Date:
Subject: Re: postmaster core ( finally I have it ) [ vacuum pg_rewrite ]
Next
From: Robert Creager
Date:
Subject: Re: FAQ programming entry?