Re: ALTER OBJECT any_name SET SCHEMA name - Mailing list pgsql-hackers

From Tom Lane
Subject Re: ALTER OBJECT any_name SET SCHEMA name
Date
Msg-id 29821.1288985427@sss.pgh.pa.us
Whole thread Raw
In response to Re: ALTER OBJECT any_name SET SCHEMA name  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Responses Re: ALTER OBJECT any_name SET SCHEMA name
List pgsql-hackers
Dimitri Fontaine <dimitri@2ndQuadrant.fr> writes:
> Tom Lane <tgl@sss.pgh.pa.us> writes:
>> Here's another question: if an extension's objects live (mostly or
>> entirely) in schema X, what happens if the possibly-unprivileged owner
>> of schema X decides to drop it?  If the extension itself is considered
>> to live within the schema, then "the whole extension goes away" seems
>> like a natural answer.  If not, you've got some problems.

> Currently, creating an extension is superuser only. So the owner of
> those objects is a superuser. My understanding is that the drop schema
> will then fail without any more code.

You're mistaken, and this case definitely does need more thought.
A schema owner is presumed to have the unconditional right to
drop anything in his schema, whether he owns it or not.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Daniel Farina
Date:
Subject: Re: ALTER TABLE ... IF EXISTS feature?
Next
From: Alvaro Herrera
Date:
Subject: temporary functions (and other object types)