Re: Foreign table permissions and cloning

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Foreign table permissions and cloning
Дата
Msg-id 17077.1303753510@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Foreign table permissions and cloning  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Foreign table permissions and cloning  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> Hmm, it appears we had some pre-existing inconsistency here, because
> ALL TABLES IN <schema> currently includes views.  That's weird, but
> it'll be even more weird if we adopt the approach suggested by this
> patch, which creates ALL FOREIGN TABLES IN <schema> but allows ALL
> TABLES IN <schema> to go on including views.  Maybe there is an
> argument for having ALL {TABLES|VIEWS|FOREIGN TABLES} IN <schema> - or
> maybe there isn't - but having two out of the three of them doesn't do
> anything for me.

Yeah, that's a fair point.  Another issue is that eventually foreign
tables will probably have some update capability, so designing GRANT
on the assumption that only SELECT should be allowed is a mistake.
In fact, I'd argue that GRANT ought not be enforcing such an assumption
even today, especially if it leads to asymmetry there.  Let somebody
GRANT UPDATE if they want to --- there's no need to throw an error until
the update operation is actually tried.

> Putting that together with the comments already made upthread, the
> only behavior changes I think we should make here are:

> - Add GRANT privilege [(column_list)] ON FOREIGN TABLE table TO role.
> - Require that the argument to GRANT privilege [(column_list)] ON
> TABLE TO role be an ordinary table, not a foreign table.

I think this might be going in the wrong direction given the above
thoughts.  At the very least you're going to have to make sure the
prohibition is easily reversible.
        regards, tom lane


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: make check in contrib
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: offline consistency check and info on attributes