From: Petr Jelinek <pjmodos@pjmodos.net>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: pgsql-hackers@postgresql.org
Subject: Re: GRANT ON ALL IN schema
Date: Wed, 17 Jun 2009 16:31:05 +0200
Message-ID: <4A38FE29.5030205@pjmodos.net> (raw)
In-Reply-To: <200906171644.53717.peter_e@gmx.net>
References: <4A37BF63.50008@pjmodos.net>
<4A37E122.8070303@pjmodos.net>
<4A38A956.8080600@pjmodos.net>
<200906171644.53717.peter_e@gmx.net>
Peter Eisentraut wrote:
> I think you should design this with a bit wider scope. Instead of just "all
> tables in this schema", think "all tables satisfying some condition". It has
> been requested, for example, to be able to grant on all tables that match a
> pattern.
>
Well, that's certainly possible to do. But I am not sure what kind of
conditions (besides the name), nor I don't see any sane grammar for this
(maybe something like GRANT SELECT ON TABLE WHERE NAME LIKE '%foo' but
that's far to weird). That all tables in this schema thing was agreed on
on this mailing list and put on TODO so I thought it's something people
want in this form (I know I needed it myself).
> As far as GRANT is concerned, a view is a table, so I would omit the
> VIEW/VIEWS stuff completely.
>
This maybe true for underlying implementation and for granting
permissions to a single object, but you might want to grant select on
all views without granting it to all tables in the schema. And as I said
having VIEWS and not VIEW just seems weird. Also I don't see why you
would want to add possibility of specifying stricter conditions for
objects and at the same time remove possibility of distinguishing
between tables and views.
--
Regards
Petr Jelinek (PJMODOS)
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: pjmodos@pjmodos.net, peter_e@gmx.net
Subject: Re: GRANT ON ALL IN schema
In-Reply-To: <4A38FE29.5030205@pjmodos.net>
* 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