Re: BUG #14131: BUG, schema owner can drop otheruser's object in it's schema

Поиск
Список
Период
Сортировка
От 德哥
Тема Re: BUG #14131: BUG, schema owner can drop otheruser's object in it's schema
Дата
Msg-id 30bfce8.bdfb.1549b61a771.Coremail.digoal@126.com
обсуждение исходный текст
Ответ на Re: BUG #14131: BUG, schema owner can drop otheruser's object in it's schema  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: BUG #14131: BUG, schema owner can drop otheruser's object in it's schema  (Euler Taveira <euler@timbira.com.br>)
Список pgsql-bugs

I think we can improve friendly.  
like this : 
drop object direct , if user it's not superuser & owner, then error. 
and when drop schema or database. 
When:  
drop schema schema_name cascade;  -- if some object it's not owned by schema's owner, then error.
and hint user to use FORCE option to force drop schema. (this it's currently code). 
drop schema schema_name cascade force;  

drop database also can use force.  

regards, digoal

在 2016-05-10 22:18:46,"David G. Johnston" <david.g.johnston@gmail.com> 写道:
On Tue, May 10, 2016 at 6:12 AM, <digoal@126.com> wrote:
The following bug has been logged on the website:

Bug reference:      14131
Logged by:          digoal
Email address:      digoal@126.com
PostgreSQL version: 9.5.2
Operating system:   CentOS 6.x x64
Description:

According to the SQL standard, the owner of a schema always owns all objects
within it. PostgreSQL allows schemas to contain objects owned by users other
than the schema owner. This can happen only if the schema owner grants the
CREATE privilege on his schema to someone else, or a superuser chooses to
create objects in it.

Yeah, PostgreSQL provides for more flexability - standard conformance is up to the DBA to enforce.  Its not a bug to deviate from the standard - and while there is some downside to be more flexible this particular dynamic doesn't even seem that egregious compared to other areas where we deviate.

David J.

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

Предыдущее
От: 德哥
Дата:
Сообщение: Re: BUG #14131: BUG, schema owner can drop otheruser's object in it's schema
Следующее
От: fiercetuba@protonmail.com
Дата:
Сообщение: BUG #14132: ON CONFLICT not inferring unique index with bigints