Thread: Array of integer

Array of integer

From
Olivier Ertz
Date:
Hello,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
Thank you for answering
-- 
ERTZ Olivier - ertz@illite.u-strasbg.fr - Tel 03 88 35 85 87
------------------------------------------------------------ Etudiant DESS Informatique   |   Stagiaire EOST/ULP-CGS
UniversiteLouis Pasteur    |  Ecole et Observatoire des     STRASBOURG - France       |    Sciences de la Terre
 
------------------------------------------------------------  World Wide Web : http://annite.u-strasbg.fr/~ertz 
------------------------------------------------------------


Re: [SQL] Array of integer

From
Tom Lane
Date:
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