X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E4A8455117 for ; Sun, 20 Mar 2005 16:45:56 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 22330-08 for ; Sun, 20 Mar 2005 16:45:51 +0000 (GMT) Received: from hoggle.dreamhost.com (hoggle.dreamhost.com [66.33.197.5]) by svr1.postgresql.org (Postfix) with ESMTP id E569E56374 for ; Sun, 20 Mar 2005 16:45:50 +0000 (GMT) Received: from 192.168.1.105 (pD9E8B9D6.dip.t-dialin.net [217.232.185.214]) by hoggle.dreamhost.com (Postfix) with ESMTP id BB14753825; Sun, 20 Mar 2005 08:45:42 -0800 (PST) Subject: Re: Discovering privileges From: Murray Cumming To: Michael Fuhr Cc: pgsql-interfaces In-Reply-To: <20050320154247.GA18843@winnie.fuhr.org> References: <1088799354.3319.110.camel@murrayc_debian> <1111330231.5820.4.camel@localhost.localdomain> <20050320154247.GA18843@winnie.fuhr.org> Content-Type: text/plain Date: Sun, 20 Mar 2005 17:45:29 +0100 Message-Id: <1111337130.5820.7.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-3) Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200503/55 X-Sequence-Number: 5384 On Sun, 2005-03-20 at 08:42 -0700, Michael Fuhr wrote: > On Sun, Mar 20, 2005 at 03:50:30PM +0100, Murray Cumming wrote: > > > I'm using the pg_user and pg_group system tables to discover the list of > > users, and the groups to which they belong. > > > > But how can I discover the privileges that these users and groups have > > for the various tables. Is this also in one of the system tables? > > You could look at pg_class.relacl, I can't make much sense of that so far. Ca you give any clues on how that works? > but the "Access Privilege Inquiry > Functions" (has_table_privilege(), etc.) might be easier to use. > > http://www.postgresql.org/docs/8.0/interactive/functions-info.html#FUNCTIONS-INFO-ACCESS-TABLE Interesting. Is there anything like that for a group instead of a user? I'm most interested in privileges of a group. Thanks. -- Murray Cumming murrayc@murrayc.com www.murrayc.com www.openismus.com