Add regression tests for issue #85 (Postgres quoted identifiers)#627
Merged
Add regression tests for issue #85 (Postgres quoted identifiers)#627
Conversation
Resolves #85.
macbre
approved these changes
May 8, 2026
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
Verifies that #85 — Postgres quoted identifiers — is fixed under the v3 (sqlglot) parser, and adds regression tests for the two follow-up regressions reported later in the issue thread.
The three queries from the original report (LanDinh) were already covered in
test/test_postgress.py::test_postgress_quoted_names. The two cases reported afterwards (pro100filipp), which had caused the issue to be reopened, were not covered and now are:SELECT "qouted" FROM foo— used to raiseValueError: Not supported query type!select 'some string with quote " char'— a literal containing a"character used to break parsingBoth now parse correctly; the new tests pin that behavior.
Resolves #85.
Test plan
poetry run pytest test/test_postgress.py -vv— 3 passedpoetry run pytest -q --cov=sql_metadata --cov-report=term-missing— 269 passed, 100% coverage