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

Re: unnest with generate_subscripts and same array

From: David Fetter <david(at)fetter(dot)org>
To: Carlos Fuentes <caf(at)rentrakmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: unnest with generate_subscripts and same array
Date: 2011-05-27 05:09:59
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
On Thu, May 26, 2011 at 05:17:06PM -0700, Carlos Fuentes wrote:
> Hello,
> Given that these are the only one array_col in play, is
>     select unnest(array_col), generate_subscripts(array_col) from
> table_with_array_col ;
> guaranteed to gave the subscripts match the array element?  In all the
> testing I've done it's worked, but I don't know if I was just lucky :)

That would be more of the SQL standard UNNEST, with the WITH
ORDINALITY clause.  We don't have it yet :/

David Fetter <david(at)fetter(dot)org>
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david(dot)fetter(at)gmail(dot)com
iCal: webcal://

Remember to vote!
Consider donating to Postgres:

In response to

pgsql-general by date

Next:From: Albe LaurenzDate: 2011-05-27 06:43:08
Subject: Re: PostgreSQL 8.4.8 bringing my website down every evening
Previous:From: A BDate: 2011-05-27 04:53:17
Subject: Feature request: Replicate only parts of a database

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