Make schema.sql's schema-targeting test use a mixed-case schema name - #34
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
2 tasks
TEST_SCHEMA was lowercase (_test_ed), so an unquoted identifier interpolation anywhere in the pipeline would silently fold to the same name and never get caught. Switch to mixed-case (_Test_Ed, _Test_Ed_2) and quote every reference (identifier-quote in test/deps.sql's shared per-test schema setup, %I/format() for the raw SQL calls in schema.sql itself), so a missing-quote regression in the extension's install script or these tests would fail loudly instead of silently testing the wrong, folded schema.
jnasbyupgrade
force-pushed
the
schema-quoting-robustness
branch
from
August 7, 2026 21:55
692336e to
5a8e081
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
test/sql/schema.sql's schema-targeting test used a lowercaseTEST_SCHEMA(_test_ed). A missing identifier-quote anywhere in the pipeline (this test, or the extension's own install script) would silently fold to the same name and never get caught._Test_Ed,_Test_Ed_2) and quote every reference: identifier-quote (:"TEST_SCHEMA") intest/deps.sql's shared per-test schema setup (used by every test file), and%I/format()for the raw SQL calls insideschema.sqlitself.test/expected/schema.outviamake results(all assertions pass; only the schema-name text inokmessages changed).Split out of #19 at the user's request — this is a self-contained test-quoting improvement, independent of that PR's test/install foundation work, and doesn't need to wait on it.
Test plan
make testpasses (schema, simple, build)make lintclean