pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Wickham <greg@geelong.com>
To: pgsql-sql@hub.org
Subject: Query about using arrays (for accessing pg_group)
Date: Sun, 02 Jul 2000 17:20:23 +1000
Message-ID: <20000702072023.3C29110E98@mail.surfcoast.net> (raw)


Howdy,

Am trying to implement a user/group based security model for
accessing a database which is tightly integrated with the postgresql
security model.

The problem I am having is that I am not sure how to check which
groups a user is in.

For example, if I have a user (with id of 21) in a group, I'm not
sure how to start off with the user id and pull out the group name
using normal sql.

If I try the half intuitive approach

z=> select groname from pg_group where grolist = 21;
ERROR:  Unable to identify an operator '=' for types '_int4' and 'int4'
        You will have to retype this query using an explicit cast

The cause of my problem is the use of an array to store the user id's
associated with a group. Not sure how to get around this.

Any ideas?

Please cc replies to me as I think I've fallen off this list.

tia,

   -Greg

------------------------------------------------------------------
www.geelong.com                                       Greg Wickham  
 P.O. Box 1426                                    greg@geelong.com
Geelong VIC 3220                             Ph: (+61 407) 854 566
------------------------------------------------------------------
wheNufiNdu'RselFindAngeRwheNu'rThreAtenEdbyAstrAngeRwheNitlOoksLik



view thread (2+ messages)  latest in thread

Message-ID: <20000702072023.3C29110E98@mail.surfcoast.net>
Permalink:  ../20000702072023.3C29110E98@mail.surfcoast.net/
Also on:    postgresql.org/message-id/20000702072023.3C29110E98@mail.surfcoast.net

 · 

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: greg@geelong.com, pgsql-sql@hub.org
  Subject: Re: Query about using arrays (for accessing pg_group)
  In-Reply-To: <20000702072023.3C29110E98@mail.surfcoast.net>
  References: <20000702072023.3C29110E98@mail.surfcoast.net>

* 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