- Notifications
You must be signed in to change notification settings - Fork5
Commitcb5c2ba
committed
Fix multiple bugs in extension dropping.
When we implemented extensions, we made findDependentObjects() treatEXTENSION dependency links similarly to INTERNAL links. However, thatlogic contained an implicit assumption that an object could have at mostone INTERNAL dependency, so it did not work correctly for objects havingboth INTERNAL and DEPENDENCY links. This led to failure to drop someextension member objects when dropping the extension. Furthermore, we'dnever actually exercised the case of recursing to an internally-referenced(owning) object from anything other than a NORMAL dependency, and it turnsout that passing the incoming dependency's flags to the owning object isthe Wrong Thing. This led to sometimes dropping a whole extension silentlywhen we should have rejected the drop command for lack of CASCADE.Since we obviously were under-testing extension drop scenarios, add someregression test cases. Unfortunately, such test cases require someextensions (duh), so we can't test for problems in the core regressiontests. I chose to add them to the earthdistance contrib module, which isa good test case because it has a dependency on the cube contrib module.Back-patch to 9.1. Arguably these are pre-existing bugs in INTERNALdependency handling, but since it appears that the cases can never arisepre-9.1, I'll refrain from back-patching the logic changes further thanthat.1 parentd4aa491 commitcb5c2ba
File tree
3 files changed
+477
-48
lines changed- contrib/earthdistance
- expected
- sql
- src/backend/catalog
3 files changed
+477
-48
lines changed0 commit comments
Comments
(0)