Re: [PATCH] DefaultACLs

Поиск
Список
Период
Сортировка
От Petr Jelinek
Тема Re: [PATCH] DefaultACLs
Дата
Msg-id 4A60AA5C.1040808@pjmodos.net
обсуждение исходный текст
Ответ на Re: [PATCH] DefaultACLs  (Stephen Frost <sfrost@snowman.net>)
Список 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)


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Dickson S. Guedes"
Дата:
Сообщение: Re: Duplicate key value error
Следующее
От: decibel
Дата:
Сообщение: Re: more than one index in a single heap pass?