Re: [SQL] Array of integer - Mailing list pgsql-sql

From Tom Lane
Subject Re: [SQL] Array of integer
Date
Msg-id 4810.933869178@sss.pgh.pa.us
Whole thread Raw
In response to Array of integer  (Olivier Ertz <ertz@illite.u-strasbg.fr>)
List pgsql-sql
Olivier Ertz <ertz@illite.u-strasbg.fr> writes:
>     in pg_group, grolist give the list of the members of the group
> how can i extract with a select request, not the whole list, but first
> the one, the second, etc ...  like :
>     select grolist[i] from pg_group where ...
>     i is varying from 0..N

In releases through 6.5 you have to write array references as a fully
qualified name:select pg_group.grolist[i] from pg_group where ...

This is fixed for 6.6...
        regards, tom lane


pgsql-sql by date:

Previous
From: Olivier Ertz
Date:
Subject: Array size
Next
From: "Ross J. Reedstrom"
Date:
Subject: Re: [SQL] primary key view failure