Re: GRANT ON ALL IN schema - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: GRANT ON ALL IN schema
Date
Msg-id 200906171644.53717.peter_e@gmx.net
Whole thread Raw
In response to Re: GRANT ON ALL IN schema  (Petr Jelinek <pjmodos@pjmodos.net>)
Responses Re: GRANT ON ALL IN schema  (Stephen Frost <sfrost@snowman.net>)
Re: GRANT ON ALL IN schema  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: GRANT ON ALL IN schema  (Petr Jelinek <pjmodos@pjmodos.net>)
Re: GRANT ON ALL IN schema  (Bernd Helmle <mailings@oopsware.de>)
List pgsql-hackers
On Wednesday 17 June 2009 11:29:10 Petr Jelinek wrote:
> The patch allows "GRANT ON ALL TABLES/VIEWS/FUNCTIONS/SEQUENCES IN
> schemaname, schemaname2 TO username" and same thing for REVOKE.
> Words TABLES, VIEWS, FUNCTIONS and SEQUENCES were added as unreserved
> keywords. Unfortunately I was unable to create syntax with optional
> SCHEMA keyword after IN (shift/reduce conflicts), if it's needed maybe
> somebody with better bison knowledge might add it.

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.

> Also since this patch introduces VIEWS as object with grantable
> privileges, I added GRANT ON VIEW foo syntax which is more or less
> synonymous to GRANT ON TABLE foo syntax. It felt weird to have GRANT ON
> ALL VIEWS but not GRANT ON VIEW.

As far as GRANT is concerned, a view is a table, so I would omit the 
VIEW/VIEWS stuff completely.


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: plpgsql error message
Next
From: Stephen Frost
Date:
Subject: Re: GRANT ON ALL IN schema