Re: [PATCH] DefaultACLs

From: Petr Jelinek <pjmodos(at)pjmodos(dot)net>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] DefaultACLs
Date: 2009-07-17 16:44:12
Message-ID: 4A60AA5C.1040808@pjmodos.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Stephen Frost wrote:
>
> I agree that they should be consistant. The GRANT ON ALL shares alot
> more of the syntax with GRANT than DefaultACL though, which makes it a
> more interesting question there. I can understand not wanting to
> duplicate the GRANT syntax. I think my suggestion would be to add a
> field to the structure passed around by GRANT which indicates if 'VIEW'
> was requested or not in the command. This could be used both for GRANT
> ON ALL and to allow 'GRANT ON VIEW blah' to verify that the relation
> being granted on is a view.
>

I arrived into this conclusion too, but it adds a lot of clutter in
gram.y (setting that flag to false or something in many places, just to
use in in one place).

Originally I thought adding ACL_OBJECT_VIEW wasn't such a bad idea. But
after I looked more closely at the code, it it seems to me that having
same object type for VIEW and TABLE seems like the only logical reason
why GRANT uses separate object type enum at all (instead of using subset
of ObjectType like other commands do). If we went this path of
separating VIEW and TABLE in GRANT code it might be cleaner to remove
GrantObjectType and use ObjectType, but I don't think we want to do that.

--
Regards
Petr Jelinek (PJMODOS)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message decibel 2009-07-17 16:57:51 Re: more than one index in a single heap pass?
Previous Message Dickson S. Guedes 2009-07-17 16:25:25 Re: Duplicate key value error