]> granicus.if.org Git - postgresql/commit
DROP OWNED: don't try to drop tablespaces/databases
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Mon, 28 Jan 2013 20:46:47 +0000 (17:46 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Mon, 28 Jan 2013 21:59:05 +0000 (18:59 -0300)
commit2d4e3387930c199f8c3b863442c5bee75eacb797
treedeec8fcca6c082f7f71c2084c795fce09f303ef2
parent5ca31a758a030a867a2a9f43298be291fd717d32
DROP OWNED: don't try to drop tablespaces/databases

My "fix" for bugs #7578 and #6116 on DROP OWNED at fe3b5eb08a1 not only
misstated that it applied to REASSIGN OWNED (which it did not affect),
but it also failed to fix the problems fully, because I didn't test the
case of owned shared objects.  Thus I created a new bug, reported by
Thomas Kellerer as #7748, which would cause DROP OWNED to fail with a
not-for-user-consumption error message.  The code would attempt to drop
the database, which not only fails to work because the underlying code
does not support that, but is a pretty dangerous and undesirable thing
to be doing as well.

This patch fixes that bug by having DROP OWNED only attempt to process
shared objects when grants on them are found, ignoring ownership.

Backpatch to 8.3, which is as far as the previous bug was backpatched.
doc/src/sgml/ref/drop_owned.sgml
src/backend/catalog/pg_shdepend.c