Background
Same underlying principle as extension_drop's own schema-independence (see CLAUDE.md), applied one level over: the test suite exercises extension_drop's __get/__add/__remove commands via a helper "test extension" (extension_drop_test, defined in test/extension/). Nothing the suite is actually testing should depend on:
- which schema
extension_drop_test is installed into, or
- what
extension_drop_test is even named
...but today both are effectively hardcoded/assumed throughout the test files.
Proposed fix (not yet designed in detail)
- Install
extension_drop_test under a randomized name each run, with a constant prefix (e.g. extension_drop_test_<random>) so old/leftover copies from interrupted runs can still be identified and dropped reliably.
- Install it into a randomized schema too, same as the schema-randomization idea being worked out for
extension_drop itself (see the related, separate work happening in pg_count_nulls for the reference pattern, and extension_tools#36 for the current, likely-to-be-superseded interim approach).
Why this is a separate TODO, not immediate work
The test extension's name is hardcoded in a bunch of different places (control file, SQL files, Makefile install rules, test/extension/ naming) — a bigger refactor than simply testing extension_drop itself in a random schema. Deliberately deferred; this issue exists to not lose the idea, not to schedule the work yet.
Background
Same underlying principle as extension_drop's own schema-independence (see CLAUDE.md), applied one level over: the test suite exercises extension_drop's
__get/__add/__removecommands via a helper "test extension" (extension_drop_test, defined intest/extension/). Nothing the suite is actually testing should depend on:extension_drop_testis installed into, orextension_drop_testis even named...but today both are effectively hardcoded/assumed throughout the test files.
Proposed fix (not yet designed in detail)
extension_drop_testunder a randomized name each run, with a constant prefix (e.g.extension_drop_test_<random>) so old/leftover copies from interrupted runs can still be identified and dropped reliably.extension_dropitself (see the related, separate work happening inpg_count_nullsfor the reference pattern, and extension_tools#36 for the current, likely-to-be-superseded interim approach).Why this is a separate TODO, not immediate work
The test extension's name is hardcoded in a bunch of different places (control file, SQL files, Makefile install rules,
test/extension/naming) — a bigger refactor than simply testing extension_drop itself in a random schema. Deliberately deferred; this issue exists to not lose the idea, not to schedule the work yet.