Skip to content

Reverse SQLite string-literal identifiers to double-quoted ones - #149

Merged
LucaCappelletti94 merged 1 commit into
mainfrom
fix/reverse-string-alias
Oct 24, 2026
Merged

LucaCappelletti94 merged 1 commit into
mainfrom
fix/reverse-string-alias

Conversation

@LucaCappelletti94

Copy link
Copy Markdown
Collaborator

SQLite accepts a string literal where its grammar names an identifier, so SELECT id AS 'label' FROM users names the column label. The reverse translator kept the single quotes, and PostgreSQL rejects AS 'label'. Since sqlparser #2668 its PostgreSQL dialect rejects it as well, so the committed reverse seed ec46c0b9 now fails fuzz_reverse_translation on main.

The identifier normalizer now rewrites single-quoted identifiers to double quotes, as it already did for backticks and brackets. PostgreSQL has no zero-length identifier, so an empty delimited one is refused instead of rendered.

SQLite accepts a string literal where its grammar names an identifier, so `SELECT id AS 'label' FROM users` names the column `label`. The reverse translator kept the single quotes, and PostgreSQL rejects `AS 'label'`. Since sqlparser #2668 its PostgreSQL dialect rejects it as well, so the committed reverse seed `ec46c0b9` now fails `fuzz_reverse_translation` on main.

The identifier normalizer now rewrites single-quoted identifiers to double quotes, as it already did for backticks and brackets. PostgreSQL has no zero-length identifier, so an empty delimited one is refused instead of rendered.
@LucaCappelletti94 LucaCappelletti94 added the bug Something isn't working label Oct 23, 2026
@codecov

codecov Bot commented Oct 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@LucaCappelletti94
LucaCappelletti94 merged commit f1c9fa4 into main Oct 24, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant