Re: GRANT ON ALL IN schema

Поиск
Список
Период
Сортировка
От Petr Jelinek
Тема Re: GRANT ON ALL IN schema
Дата
Msg-id 4A38FE29.5030205@pjmodos.net
обсуждение исходный текст
Ответ на Re: GRANT ON ALL IN schema  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
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)



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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: GRANT ON ALL IN schema
Следующее
От: Petr Jelinek
Дата:
Сообщение: Re: GRANT ON ALL IN schema