Query about using arrays (for accessing pg_group)

From: Greg Wickham <greg(at)geelong(dot)com>
To: pgsql-sql(at)hub(dot)org
Subject: Query about using arrays (for accessing pg_group)
Date: 2000-07-02 07:20:23
Message-ID: 20000702072023.3C29110E98@mail.surfcoast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


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(at)geelong(dot)com
Geelong VIC 3220 Ph: (+61 407) 854 566
------------------------------------------------------------------
wheNufiNdu'RselFindAngeRwheNu'rThreAtenEdbyAstrAngeRwheNitlOoksLik

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Joachim Trinkwitz 2000-07-02 12:28:57 Re: retrieving a serial number
Previous Message Andrey 2000-07-01 15:56:20 function