Re: unnest - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: unnest
Date
Msg-id 200411290218.iAT2IWW05787@candle.pha.pa.us
Whole thread Raw
In response to unnest  ("John Hansen" <john@geeknet.com.au>)
Responses Re: unnest  (Joe Conway <mail@joeconway.com>)
List pgsql-hackers
I assume this is not something for our PostgreSQL CVS, even the later
SRF implementation.

---------------------------------------------------------------------------

John Hansen wrote:
> 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
> 

Content-Description: Makefile

[ Attachment, skipping... ]

Content-Description: unnest.c

[ Attachment, skipping... ]

Content-Description: unnest.sql

[ Attachment, skipping... ]

> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [pgsql-www] pg_autovacuum is nice ... but ...
Next
From: Russell Smith
Date:
Subject: Auto Vacuum