Skip to content

Make schema.sql's schema-targeting test use a mixed-case schema name - #34

Merged
jnasbyupgrade merged 1 commit into
masterfrom
schema-quoting-robustness
Aug 7, 2026
Merged

Make schema.sql's schema-targeting test use a mixed-case schema name#34
jnasbyupgrade merged 1 commit into
masterfrom
schema-quoting-robustness

Conversation

@jnasbyupgrade

Copy link
Copy Markdown
Contributor

Summary

  • test/sql/schema.sql's schema-targeting test used a lowercase TEST_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.
  • Switch to mixed-case (_Test_Ed, _Test_Ed_2) and quote every reference: identifier-quote (:"TEST_SCHEMA") in test/deps.sql's shared per-test schema setup (used by every test file), and %I/format() for the raw SQL calls inside schema.sql itself.
  • Regenerated test/expected/schema.out via make results (all assertions pass; only the schema-name text in ok messages 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 test passes (schema, simple, build)
  • make lint clean

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: d1fec4ef-a6f0-41ef-9d23-b5126866b512

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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
jnasbyupgrade changed the base branch from migrate-test-build to master August 7, 2026 21:55
@jnasbyupgrade
jnasbyupgrade force-pushed the schema-quoting-robustness branch from 692336e to 5a8e081 Compare August 7, 2026 21:55
@jnasbyupgrade
jnasbyupgrade merged commit d70b1fb into master Aug 7, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant