Re: DROP TABLE can be issued by schema owner as well as table owner

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Derrick Rice <derrick(dot)rice(at)gmail(dot)com>, pgsql-docs(at)postgresql(dot)org
Subject: Re: DROP TABLE can be issued by schema owner as well as table owner
Date: 2011-10-15 14:08:11
Message-ID: 201110151408.p9FE8CK02232@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs


Robert Haas wrote:
> On Fri, Oct 14, 2011 at 11:11 AM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> > Robert Haas wrote:
> >> On Thu, Oct 13, 2011 at 10:06 AM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> >> > I applied the following documentation patch to clarify this issue, and
> >> > used generic wording "user with the proper permissions".
> >>
> >> That doesn't seem like an improvement; what permissions are proper?
> >
> > No idea, but it hints that other users can do it too. ?I thought too
> > specific was too complex for this case.
>
> I disagree. I think it's the purpose of documentation to be specific.
> The code says:
>
> /* Allow DROP to either table owner or schema owner */
> if (!pg_class_ownercheck(relOid, GetUserId()) &&
> !pg_namespace_ownercheck(classform->relnamespace, GetUserId()))
> aclcheck_error(ACLCHECK_NOT_OWNER, ACL_KIND_CLASS,
> rel->relname);
>
> So the command can be executed by the owner of the table, the owner of
> the containing schema, or the superuser.
>
> That seems simple enough.

OK, done.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

Attachment Content-Type Size
/rtmp/drop text/x-diff 883 bytes

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2011-10-15 15:24:34 Re: PQconninfoParse()
Previous Message Dmitriy Igrishin 2011-10-15 11:12:02 Re: PQconninfoParse()