Re: array support patch phase 1 patch - Mailing list pgsql-patches

From Kris Jurka
Subject Re: array support patch phase 1 patch
Date
Msg-id Pine.LNX.4.33.0306021321470.15040-100000@leary.csoft.net
Whole thread Raw
In response to Re: array support patch phase 1 patch  (Joe Conway <mail@joeconway.com>)
Responses Re: array support patch phase 1 patch
List pgsql-patches

On Mon, 2 Jun 2003, Joe Conway wrote:

> Kris Jurka wrote:
> > I was trying formulate a way to make a function which will explode an
> > array into a resultset composed of the index and value.  So '{3,4,7}'
> > would become
> >
> > index    value
> > 1    3
> > 2    4
> > 3    7
> >
>
> I submitted a function that would do this, array_values(), but it was
> rejected. See:
> http://archives.postgresql.org/pgsql-hackers/2002-12/msg00453.php
>
> Perhaps we should revisit that decision before feature freeze for 7.4?

For the group listing example given in your original post what I want to
is produce a query which could return:

group_name    member_name
g1        user1
g1        user2
g2        user1
g2        user2
g2        user3

This can be done with the current array functionality:

SELECT g.groname, s.usename
FROM pg_group g, pg_shadow s
WHERE s.usesysid = ANY (g.grolist);

The problem arises when trying to join arrays as if they were tables.


pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [INTERFACES] pygresql build/install problems: use setup.py?
Next
From: Joe Conway
Date:
Subject: Re: array support patch phase 1 patch