Skip to content

AT TIME ZONE can be used more widely than is currently supported #2651

@afrieder

Description

@afrieder

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'

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions