From: Milen Dzhumerov <gamehack@gmail.com>
To: pgsql-admin@postgresql.org
Subject: Re: Table permissions
Date: Mon, 27 Mar 2006 16:43:04 +0100
Message-ID: <44280808.6070500@gmail.com> (raw)
In-Reply-To: <200603270110.04407.peter_e@gmx.net>
References: <4426FAEB.6030205@gmail.com>
<200603270110.04407.peter_e@gmx.net>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: gamehack@gmail.com
Subject: Re: Table permissions
In-Reply-To: <44280808.6070500@gmail.com>
References: <4426FAEB.6030205@gmail.com> <200603270110.04407.peter_e@gmx.net> <44280808.6070500@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox