Re: trouble selecting from array

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: brian <brian(at)zijn-digital(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: trouble selecting from array
Date: 2008-03-28 00:58:51
Message-ID: 20368.1206665931@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

brian <brian(at)zijn-digital(dot)com> writes:
> If I select the column as tdr_tags I get:

> {{161377},{32}}
> {{206507},{39}}
> {{232972,292831},{45,51}}
> ...

> But, wanting just the 2nd inner array, if I try tdr_tags[2] I get NULL.

If you want a sub-array you need to use the slice notation, eg
tdr_tags[2:2][1:2]

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrej Ricnik-Bay 2008-03-28 01:00:39 Re: Survey: renaming/removing script binaries (createdb, createuser...)
Previous Message Ben 2008-03-28 00:58:49 Re: Survey: renaming/removing script binaries (createdb, createuser...)