Re: Missing array support - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Missing array support
Date
Msg-id Pine.LNX.4.44.0306282214060.2178-100000@peter.localdomain
Whole thread Raw
In response to Missing array support  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Missing array support  (Joe Conway <mail@joeconway.com>)
Re: Missing array support  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I wrote:

> * Using an array as a table source using UNNEST, something like:
>
> select * from unnest(test.b);

Btw., it would be really nice if some limited form of this could get done,
so I could finish the information schema views pertaining to group
privileges.  I'd just need a way to find out what users are in what
groups.  If unnest() would work for locally constant arguments, I think it
could be done like

SELECT g.groname
FROM pg_user u, pg_group g
WHERE u.usesysid IN (SELECT * FROM UNNEST((SELECT grolist FROM pg_group WHERE grosysid = g.grosysid)))     AND
u.usename= current_user;
 

Or is there some other way to do this now?

-- 
Peter Eisentraut   peter_e@gmx.net



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Documentation is building again
Next
From: Peter Eisentraut
Date:
Subject: Re: Documentation is building again