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 6183F54E9E for ; Sun, 20 Mar 2005 15:36:18 +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 06614-04 for ; Sun, 20 Mar 2005 15:36:08 +0000 (GMT) Received: from wolff.to (wolff.to [66.93.249.74]) by svr1.postgresql.org (Postfix) with SMTP id 5E18D5676A for ; Sun, 20 Mar 2005 15:36:07 +0000 (GMT) Received: (qmail 4583 invoked by uid 500); 20 Mar 2005 15:52:30 -0000 Date: Sun, 20 Mar 2005 09:52:30 -0600 From: Bruno Wolff III To: Murray Cumming Cc: pgsql-interfaces Subject: Re: Discovering privileges Message-ID: <20050320155230.GA3935@wolff.to> Mail-Followup-To: Bruno Wolff III , Murray Cumming , pgsql-interfaces References: <1088799354.3319.110.camel@murrayc_debian> <1111330231.5820.4.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1111330231.5820.4.camel@localhost.localdomain> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.01 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/52 X-Sequence-Number: 5381 On Sun, Mar 20, 2005 at 15:50:30 +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? In recent (7.4+ I think) versions of Postgres there are functions provided for testing access to tables. Look at table 9-40 in section 9.19 of the version 8 manual.