diff options
| author | Tom Lane | 2011-07-23 20:59:39 +0000 |
|---|---|---|
| committer | Tom Lane | 2011-07-23 20:59:39 +0000 |
| commit | 988cccc620dd8c16d77f88ede167b22056176324 (patch) | |
| tree | dfbe1be00080bf91976341ce55a5624c2403b796 /src/include | |
| parent | 6f1be5a67a758499beab0082b6e63b3040913268 (diff) | |
Rethink behavior of CREATE OR REPLACE during CREATE EXTENSION.
The original implementation simply did nothing when replacing an existing
object during CREATE EXTENSION. The folly of this was exposed by a report
from Marc Munro: if the existing object belongs to another extension, we
are left in an inconsistent state. We should insist that the object does
not belong to another extension, and then add it to the current extension
if not already a member.
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/catalog/dependency.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/catalog/dependency.h b/src/include/catalog/dependency.h index a3bd729156..5dfb25fee7 100644 --- a/src/include/catalog/dependency.h +++ b/src/include/catalog/dependency.h @@ -201,7 +201,8 @@ extern void recordMultipleDependencies(const ObjectAddress *depender, int nreferenced, DependencyType behavior); -extern void recordDependencyOnCurrentExtension(const ObjectAddress *object); +extern void recordDependencyOnCurrentExtension(const ObjectAddress *object, + bool isReplace); extern long deleteDependencyRecordsFor(Oid classId, Oid objectId, bool skipExtensionDeps); |
