Re: ALTER OBJECT any_name SET SCHEMA name
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dimitri Fontaine <dimitri@2ndQuadrant.fr>
Cc: Alvaro Herrera <alvherre@commandprompt.com>, Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2010-11-05T19:30:27Z
Lists: 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