[HACKERS] privileges for changing schema owner

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема [HACKERS] privileges for changing schema owner
Дата
Msg-id e8f31d00-7b68-b872-a73d-e36f8ce938e7@2ndquadrant.com
обсуждение исходный текст
Ответы Re: [HACKERS] privileges for changing schema owner  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Normally, when changing the owner of an object, we check (among other
things) that the new owner has the same privileges that would be needed
to create the object from scratch.  For for example, when changing the
owner of a type, the new owner needs to have CREATE privilege on the
containing schema.  Or when changing the owner of a foreign server, the
new owner needs to have USAGE privilege on the foreign-data wrapper.

The exception is that when changing the owner of a schema or database,
we check CREATE privilege on the database of the *current* user.  There
is even a comment about it in the code:
    * NOTE: This is different from other alter-owner checks in that the    * current user is checked for create
privilegesinstead of the    * destination owner.  This is consistent with the CREATE case for    * schemas.
 

I don't understand the rationale for this or what rationale that last
sentence is apparently trying to give.

I'm trying to extrapolate whatever rule this is to new object types, if
appropriate.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] Proposal : For Auto-Prewarm.
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] pg_hba_file_settings view patch