(as ever, thanks for this excellent library!)
It seems that in postgres, specifying a timezone in a string is not enough for it to parse a timezone — postgres requires WITH TIMEZONE:
PostgreSQL never examines the content of a literal string before determining its type, and therefore will treat both of the above as timestamp without time zone. To ensure that a literal is treated as timestamp with time zone, give it the correct explicit type:
TIMESTAMP WITH TIME ZONE '2004-10-19 10:23:54+02'
And sqlparser seems to discard that term:
https://github.com/sqlparser-rs/sqlparser-rs/blob/8f207db0598139310211e808ea6e5f853d3a3a96/src/parser.rs
So IIUC it's not currently possible to correctly parse a postgres TIMESTAMP WITH TIME ZONE
(as ever, thanks for this excellent library!)
It seems that in postgres, specifying a timezone in a string is not enough for it to parse a timezone — postgres requires
WITH TIMEZONE:And
sqlparserseems to discard that term:https://github.com/sqlparser-rs/sqlparser-rs/blob/8f207db0598139310211e808ea6e5f853d3a3a96/src/parser.rs
So IIUC it's not currently possible to correctly parse a postgres
TIMESTAMP WITH TIME ZONE