Skip to content

parse true and false as column names, not booleans in Microsoft SQL server #1508

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lovasoa opened this issue Nov 10, 2024 · 0 comments · Fixed by #1510
Closed

parse true and false as column names, not booleans in Microsoft SQL server #1508

lovasoa opened this issue Nov 10, 2024 · 0 comments · Fixed by #1510

Comments

@lovasoa
Copy link
Contributor

lovasoa commented Nov 10, 2024

mssql does not have a boolean type: true and false are not special keywords and they are valid column names. However, sqlparser always parses them as boolean literals, regardless of the dialect.

In the mssql dialect, in

select true from table;

true should be parsed as an Identifier, not a Value.

Parsing true and false as booleans in mssql causes the following confusing behavior in SQLPage: sqlpage/SQLPage#679

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 a pull request may close this issue.

1 participant