Re: Converting each item in array to a query result row

From: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Adam Ruth <adamruth(at)mac(dot)com>, Postgres User <postgres(dot)developer(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Converting each item in array to a query result row
Date: 2009-05-29 15:18:41
Message-ID: 2f4958ff0905290818y5f012eb4s5f39fce6ae8d31d8@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

CREATE OR REPLACE FUNCTION explode(_a anyarray) returns setof anyelement AS
$_$
BEGIN
RAISE NOTICE 'poof... just kidding... kabooom';
RETURN unnest(_a);
END;
$_$ LANGUAGE 'plpgsql'

;]

seriously, the 8.4 version is written in C, so I will be really
surprised if it under performs plpgsql one .)

--
GJ

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2009-05-29 15:24:19 Re: optimize/cleanup SQL
Previous Message Geoffrey 2009-05-29 14:52:06 Re: pg_usleep() location