pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Davis <mdavis@sevainc.com>
To: 'chard' <chard@hindang.msuiit.edu.ph>
To: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: RE: retrieving user's groups
Date: Tue, 23 Jan 2001 19:55:45 -0700
Message-ID: <01C08576.7D763D70.mdavis@sevainc.com> (raw)

Here's a start:

select g.groname as group, g.grosysid as group_id, u.usename as user, 
u.usesysid as user_id from pg_group g, pg_user u
         where u.usesysid = g.grolist[1] or u.usesysid = g.grolist[2] or 
u.usesysid = g.grolist[3] or u.usesysid = g.grolist[4] or u.usesysid = 
g.grolist[5] or
               u.usesysid = g.grolist[6] or u.usesysid = g.grolist[7] or 
u.usesysid = g.grolist[8] or u.usesysid = g.grolist[9] or u.usesysid = 
g.grolist[10]
         order by groname, usename;


-----Original Message-----
From:	chard [SMTP:chard@hindang.msuiit.edu.ph]
Sent:	Tuesday, January 23, 2001 7:39 PM
To:	pgsql-sql@postgresql.org
Subject:	retrieving user's groups

hello,
 how will i retrieve group names of a certain user? using sql.

richard








view thread (2+ messages)

Message-ID: <01C08576.7D763D70.mdavis@sevainc.com>
Permalink:  ../01C08576.7D763D70.mdavis@sevainc.com/
Also on:    postgresql.org/message-id/01C08576.7D763D70.mdavis@sevainc.com

 · 

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-sql@postgresql.org
  Cc: mdavis@sevainc.com, chard@hindang.msuiit.edu.ph
  Subject: Re: retrieving user's groups
  In-Reply-To: <01C08576.7D763D70.mdavis@sevainc.com>
  References: <01C08576.7D763D70.mdavis@sevainc.com>

* 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