Re: generic way to retrieve array as rowset - Mailing list pgsql-general

From SunWuKung
Subject Re: generic way to retrieve array as rowset
Date
Msg-id MPG.1e24c6927bb966f9989684@news.postgresql.org
Whole thread Raw
In response to generic way to retrieve array as rowset  (SunWuKung <Balazs.Klein@axelero.hu>)
Responses Re: generic way to retrieve array as rowset
Re: generic way to retrieve array as rowset
List pgsql-general
Thank you both, I will make good use of this.

On a side note: isn't it a pity this has to be so difficult?

Balázs

In article <20060103151044.GF9478@webserv.wug-glas.de>,
andreas.kretschmer@schollglas.com says...
> am  03.01.2006, um 16:42:08 +0200 mailte Volkan YAZICI folgendes:
> > Hi,
> >
> > Here's a modified version of A. Kretschmer's answer. This one checks
> > array_upper() sizes and depending on it, doesn't provide unnecessary
> > NULL fields. HTH.
> >
> > SELECT id, val[s.i]
> > FROM t7
> > LEFT JOIN
> >     (SELECT g.s
> >         FROM generate_series(1,
> >             (SELECT max(array_upper(val, 1)) FROM t7)) AS g(s)
> >     ) AS s(i)
> >     ON (s.i <= array_upper(val, 1));
>
> Cool ;-)
>
>
> Andreas
>

pgsql-general by date:

Previous
From: "FERREIRA, William (GFI INFORMATIQUE)"
Date:
Subject: build Postgresql on Solaris 64 bits
Next
From: Marc Munro
Date:
Subject: Re: I want to know how to improve the security of postgresql