Describe the bug
AT TIME ZONE is currently only supported after column names or select function calls but can be used much more widely.
Database Engine
PSQL
To Reproduce
In Node 22.14.0, node-sql-parser 5.4.0, the following SQL is valid but fails to parse:
SELECT timestamp_col AT TIME ZONE 'America/New_York' >= '2026-01-01 00:00:00'::TIMESTAMP AT TIME ZONE 'America/New_York' AS is_this_year
FROM test_table
WHERE timestamp_col AT TIME ZONE 'America/New_York' >= '2025-01-01 00:00:00'::TIMESTAMP AT TIME ZONE 'America/New_York'
Describe the bug
AT TIME ZONEis currently only supported after column names or select function calls but can be used much more widely.Database Engine
PSQL
To Reproduce
In Node 22.14.0, node-sql-parser 5.4.0, the following SQL is valid but fails to parse: