Re: trouble selecting from array - Mailing list pgsql-general

From Tom Lane
Subject Re: trouble selecting from array
Date
Msg-id 20368.1206665931@sss.pgh.pa.us
Whole thread Raw
In response to trouble selecting from array  (brian <brian@zijn-digital.com>)
Responses Re: trouble selecting from array  (brian <brian@zijn-digital.com>)
Re: trouble selecting from array  ("Merlin Moncure" <mmoncure@gmail.com>)
List pgsql-general
brian <brian@zijn-digital.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

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Survey: renaming/removing script binaries (createdb, createuser...)
Next
From: Ben
Date:
Subject: Re: Survey: renaming/removing script binaries (createdb, createuser...)