pgsql: Disallow deletion of CurrentExtensionObject while running extens - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Disallow deletion of CurrentExtensionObject while running extens
Date
Msg-id E1RVBKm-0001qX-Ci@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/871dd024a6adf7766702b1cdacfb02bd8002d2bb

Modified Files
--------------
src/backend/commands/extension.c |   17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)


pgsql-committers by date:

Previous
From: Bruce Momjian
Date:
Subject: pgsql: Pgindent clauses.c, per request from Tom.
Next
From: Tom Lane
Date:
Subject: pgsql: Disallow deletion of CurrentExtensionObject while running extens