Skip site navigation (1) Skip section navigation (2)

Re: Help with a query

From: Klint Gore <kg(at)kgb(dot)une(dot)edu(dot)au>
To: Alexander Cohen <alex(at)toomuchspace(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Help with a query
Date: 2004-02-26 22:40:17
Message-ID: 403E75D18D.853AKG@129.180.47.120 (view raw or flat)
Thread:
Lists: pgsql-general
On Thu, 26 Feb 2004 16:47:10 -0500, Alexander Cohen <alex(at)toomuchspace(dot)com> wrote:
> Im trying to get a list of all groups that a certain user is a member 
> of. Can anyone help me with the sql to get that?

select groname
>from pg_group
where (select usesyside from pg_shadow where usename = 'postgres') =
any(grolist);

klint.

+---------------------------------------+-----------------+
: Klint Gore                            : "Non rhyming    :
: EMail   : kg(at)kgb(dot)une(dot)edu(dot)au           :  slang - the    :
: Snail   : A.B.R.I.                    :  possibilities  :
: Mail      University of New England   :  are useless"   :
:           Armidale NSW 2351 Australia :     L.J.J.      :
: Fax     : +61 2 6772 5376             :                 :
+---------------------------------------+-----------------+

In response to

pgsql-general by date

Next:From: Steve CrawfordDate: 2004-02-26 22:49:59
Subject: Re: PostgreSQL on XFS experiences?
Previous:From: Andrew SullivanDate: 2004-02-26 22:35:41
Subject: Re: Postgres clustering?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group