Received: from mail.surfcoast.net (IDENT:postfix@gateway.geelong.com [203.23.178.223]) by hub.org (8.10.1/8.10.1) with ESMTP id e627L8S48824 for ; Sun, 2 Jul 2000 03:21:09 -0400 (EDT) Received: from vhosts.surfcoast.net (localhost [127.0.0.1]) by mail.surfcoast.net (Postfix) with ESMTP id 3C29110E98 for ; Sun, 2 Jul 2000 17:20:23 +1000 (EST) To: pgsql-sql@hub.org From: Greg Wickham Subject: Query about using arrays (for accessing pg_group) X-Http-Homepage: http://www.geelong.com Date: Sun, 02 Jul 2000 17:20:23 +1000 Message-Id: <20000702072023.3C29110E98@mail.surfcoast.net> X-Archive-Number: 200007/2 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