X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 57FB79DC86F for ; Mon, 27 Mar 2006 11:43:08 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 91927-05 for ; Mon, 27 Mar 2006 11:43:12 -0400 (AST) X-Greylist: delayed 19:08:15.406654 by SQLgrey- Received: from hyperion.stayhosted.com (hyperion.stayhosted.com [70.84.193.98]) by postgresql.org (Postfix) with ESMTP id 594369DCAE5 for ; Mon, 27 Mar 2006 11:43:06 -0400 (AST) Received: from host86-141-61-176.range86-141.btcentralplus.com ([86.141.61.176]) by hyperion.stayhosted.com with esmtpa (Exim 4.52) id 1FNts9-000512-Lm for pgsql-admin@postgresql.org; Mon, 27 Mar 2006 15:43:14 +0000 Message-ID: <44280808.6070500@gmail.com> Date: Mon, 27 Mar 2006 16:43:04 +0100 From: Milen Dzhumerov User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Re: Table permissions References: <4426FAEB.6030205@gmail.com> <200603270110.04407.peter_e@gmx.net> In-Reply-To: <200603270110.04407.peter_e@gmx.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - hyperion.stayhosted.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - gmail.com X-Source: X-Source-Args: X-Source-Dir: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.12 required=5 tests=[AWL=0.120] X-Spam-Score: 0.12 X-Spam-Level: X-Archive-Number: 200603/295 X-Sequence-Number: 21052 Peter Eisentraut wrote: > Milen Dzhumerov wrote: > >> Unfortunately if I try to submit it, it gives me some >> error. >> > > You need to post your exact input and the exact output. Otherwise we're > just guessing. > > >> My other >> question is who has access to the pg_catalog.* tables? >> > > Everybody. > > >> And are these tables per database >> or shared across PgSQL? >> > > Most of them are per database, only a few of them are shared. > > >> Is is true that every user can check if >> he/she has access to a particular table and examine the ACL string? >> > > Yes. > > >> And how can I determine if a user can change permissions for other >> users? >> > > You can check the grant options available to the user. > > I just worked out the query which does the job and wanted to post it so if anyone wants in the future can refer to this thread. Here's the query: SELECT pg_catalog.pg_class.relacl AS permissions FROM pg_catalog.pg_class WHERE pg_catalog.pg_class.relname = 'table_name' AND pg_catalog.pg_class.relnamespace IN (SELECT pg_catalog.pg_namespace.oid FROM pg_catalog.pg_namespace WHERE pg_catalog.pg_namespace.nspname = 'schema_name'); Kind regards, gamehack