taozhi8833998 / node-sql-parser

Parse simple SQL statements into an abstract syntax tree (AST) with the visited tableList and convert it back to SQL
https://taozhi8833998.github.io/node-sql-parser/
Apache License 2.0
818 stars 181 forks source link

AT TIME ZONE fails to parse #2201

Closed dannflor closed 2 weeks ago

dannflor commented 3 weeks ago

Describe the bug using AT TIME ZONE fails to parse on 5.3.3

Database Engine PostgreSQL

To Reproduce SELECT start_time AT TIME ZONE 'UTC' AS start_time FROM my_table

Expected behavior This is valid PostgreSQL and should parse.

Additional context 'UTC' could also be a variable, not just a literal