Re: [HACKERS] Query regarding permission on table_column%type access

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: [HACKERS] Query regarding permission on table_column%type access
Дата
Msg-id 20171031123445.GY4628@tamriel.snowman.net
обсуждение исходный текст
Ответ на [HACKERS] Query regarding permission on table_column%type access  (Neha Sharma <neha.sharma@enterprisedb.com>)
Ответы Re: [HACKERS] Query regarding permission on table_column%type access  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Greetings,

* Neha Sharma (neha.sharma@enterprisedb.com) wrote:
> I have observed that even if the user does not have permission on a
> table(created in by some other user),the function parameter still can have
> a parameter of that table_column%type.

This is because the creation of the table also creates a type of the
same name and the type's permissions are independent of the table's.  I
imagine that you could REVOKE USAGE ON TYPE from the type and deny
access to that type if you wanted to.

I'm not sure that we should change the REVOKE on the table-level to also
mean to REVOKE access to the type automatically (and what happens if you
GRANT the access back for the table..?  Would we need to track that
dependency?) considering that's been the behavior for a very long time.

Thanks!

Stephen

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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: [HACKERS] Adding column_constraint description in ALTER TABLEsynopsis
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] Patch: restrict pg_rewind to whitelisted directories