Skip site navigation (1) Skip section navigation (2)

Re: unnest

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: John Hansen <john(at)geeknet(dot)com(dot)au>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: unnest
Date: 2004-11-29 02:18:32
Message-ID: 200411290218.iAT2IWW05787@candle.pha.pa.us (view raw or flat)
Thread:
Lists: 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(at)postgresql(dot)org)

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

In response to

  • unnest at 2004-11-05 12:09:58 from John Hansen

Responses

  • Re: unnest at 2004-11-29 17:23:56 from Joe Conway

pgsql-hackers by date

Next:From: Russell SmithDate: 2004-11-29 02:19:41
Subject: Auto Vacuum
Previous:From: Bruce MomjianDate: 2004-11-29 02:03:54
Subject: Re: [pgsql-www] pg_autovacuum is nice ... but ...

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group