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

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 (view raw or flat)
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

pgsql-general by date

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

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