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

From Brendan Jurd
Subject Re: GRANT ON ALL IN schema
Date
Msg-id 37ed240d0910121835y12107b58tc2e8b127e45b7e14@mail.gmail.com
Whole thread Raw
In response to Re: GRANT ON ALL IN schema  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
2009/10/13 Tom Lane <tgl@sss.pgh.pa.us>:
> I started looking at this, and the first thing I noticed was that it
> adds TABLES, FUNCTIONS, and SEQUENCES as unreserved keywords.  Now
> I'm not a fan of bloating the parser that way, but I have to admit
> that "GRANT ON ALL TABLE IN SCHEMA" wouldn't read well.  What I am
> wondering is whether we should not go back and adjust the syntax
> for the default-ACLs patch to use the same keywords, ie not
>
> ALTER DEFAULT PRIVILEGES ... GRANT ... ON TABLE TO ...
>
> but
>
> ALTER DEFAULT PRIVILEGES ... GRANT ... ON TABLES TO ...
>
> Comments?

My personal feeling is that the syntax of ALTER DEFAULT PRIVILEGES
works fine as it stands.  When you specify a default priv of "GRANT
SELECT ON TABLE TO dave" on a schema, it means that whenever you
create a table it implicitly does a "GRANT SELECT ON <new table> TO
dave".

I think the symmetry between the default priv and the related GRANT
outweighs the consideration of whether the command parses more like a
valid English sentence.

Cheers,
BJ


pgsql-hackers by date:

Previous
From: KaiGai Kohei
Date:
Subject: Re: [PATCH] Reworks for Access Control facilities (r2350)
Next
From: David Fetter
Date:
Subject: CTE bug?