LucaCappelletti94 opened a new pull request, #3060:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/3060
PostgreSQL 17 added `AT LOCAL`, which converts a timestamp to the session
time zone like `AT TIME ZONE current_setting('TimeZone')`
([docs](https://www.postgresql.org/docs/current/functions-datetime.html#FUNCTIONS-DATETIME-ZONECONVERT)).
The parser only knew `AT TIME ZONE`, so `SELECT CAST((CAST(NULL AS
timestamptz) AT LOCAL) AS TEXT)` failed with `Expected: ), found: AT`.
This PR adds `Expr::AtLocal`, parsed behind a new
`Dialect::supports_at_local` enabled for PostgreSQL and Generic. It takes the
`AT TIME ZONE` precedence as in the PostgreSQL grammar, so it binds tighter
than `+` and chains left with `AT TIME ZONE`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]