Skip to content
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

Keywords AT TIME ZONE can be followed by a column #605

Open
jdclarke5 opened this issue Sep 6, 2022 · 0 comments
Open

Keywords AT TIME ZONE can be followed by a column #605

jdclarke5 opened this issue Sep 6, 2022 · 0 comments

Comments

@jdclarke5
Copy link

jdclarke5 commented Sep 6, 2022

We have queries which reference a column after AT TIME ZONE rather than just supplying a string. This results in a valid query which executes as expected (in PostgreSQL). The parser currently raises an error Expected Token::SingleQuotedString after AT TIME ZONE, found: the_column.

For example, instead of SELECT datetime_column AT TIME ZONE 'America/Denver' FROM table it is also valid to have SELECT datetime_column AT TIME ZONE zone_column FROM table

I believe further match conditions should be added here to patch: https://github.com/sqlparser-rs/sqlparser-rs/blob/main/src/parser.rs#L1322

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

No branches or pull requests

1 participant