From: 德哥 <digoal@126.com>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: BUG #14131: BUG, schema owner can drop otheruser's object in it's schema
Date: Tue, 10 May 2016 23:55:48 +0800 (CST)
Message-ID: <30bfce8.bdfb.1549b61a771.Coremail.digoal@126.com> (raw)
In-Reply-To: <CAKFQuwaYKC8Kn--A2Hq2PA78XwBhfqd90TQ9qkrCLwu6uUc_kA@mail.gmail.com>
References: <20160510131217.2607.12651@wrigleys.postgresql.org>
<CAKFQuwaYKC8Kn--A2Hq2PA78XwBhfqd90TQ9qkrCLwu6uUc_kA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: digoal@126.com, david.g.johnston@gmail.com
Subject: Re: BUG #14131: BUG, schema owner can drop otheruser's object in it's schema
In-Reply-To: <30bfce8.bdfb.1549b61a771.Coremail.digoal@126.com>
References: <20160510131217.2607.12651@wrigleys.postgresql.org> <CAKFQuwaYKC8Kn--A2Hq2PA78XwBhfqd90TQ9qkrCLwu6uUc_kA@mail.gmail.com> <30bfce8.bdfb.1549b61a771.Coremail.digoal@126.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox