pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Klint Gore <kg@kgb.une.edu.au>
To: Alexander Cohen <alex@toomuchspace.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Help with a query
Date: Fri, 27 Feb 2004 09:40:17 +1100
Message-ID: <403E75D18D.853AKG@129.180.47.120> (raw)
In-Reply-To: <54A4211E-68A5-11D8-ADD0-000A95B947DC@toomuchspace.com>
References: <54A4211E-68A5-11D8-ADD0-000A95B947DC@toomuchspace.com>

On Thu, 26 Feb 2004 16:47:10 -0500, Alexander Cohen <alex@toomuchspace.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@kgb.une.edu.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             :                 :
+---------------------------------------+-----------------+



view thread (16+ messages)  latest in thread

Message-ID: <403E75D18D.853AKG@129.180.47.120>
Permalink:  ../403E75D18D.853AKG@129.180.47.120/
Also on:    postgresql.org/message-id/403E75D18D.853AKG@129.180.47.120

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: kg@kgb.une.edu.au, alex@toomuchspace.com
  Subject: Re: Help with a query
  In-Reply-To: <403E75D18D.853AKG@129.180.47.120>
  References: <54A4211E-68A5-11D8-ADD0-000A95B947DC@toomuchspace.com> <403E75D18D.853AKG@129.180.47.120>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox