]> granicus.if.org Git - postgresql/commit
Disallow deletion of CurrentExtensionObject while running extension script.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 29 Nov 2011 00:12:17 +0000 (19:12 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 29 Nov 2011 00:12:41 +0000 (19:12 -0500)
commitec3e183ec51bb2d4032be6d5402ddc7b4c8acb71
tree45d6f75b7e3d736ddeb463b49bfde5acda3f3b31
parent8ab9df0db196b6e1afa75838394eb27e9955e80e
Disallow deletion of CurrentExtensionObject while running extension script.

While the deletion in itself wouldn't break things, any further creation
of objects in the script would result in dangling pg_depend entries being
added by recordDependencyOnCurrentExtension().  An example from Phil
Sorber convinced me that this is just barely likely enough to be worth
expending a couple lines of code to defend against.  The resulting error
message might be confusing, but it's better than leaving corrupted catalog
contents for the user to deal with.
src/backend/commands/extension.c