Re: [GENERAL] array_to_records function

2007-09-06 Thread Merlin Moncure
On 9/6/07, Yudie Pg <[EMAIL PROTECTED]> wrote: > Here I'm posting a function to convert array to records. > any other suggestions are welcome http://archives.postgresql.org/pgsql-general/2007-07/msg01240.php http://people.planetpostgresql.org/merlin/index.php?/archives/4-fun-with-arrays.html merl

[GENERAL] array_to_records function

2007-09-06 Thread Yudie Pg
Here I'm posting a function to convert array to records. any other suggestions are welcome create or replace function array_to_records(int[]) RETURNS SETOF record AS $$ DECLARE ret_rec record; a int; b int; BEGIN b = length(array_dims($1)); a = substr(array_dims($1),4, (b-4) ); FOR