Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PG's timezone set syntax is different from other variables #3207

Open
killme2008 opened this issue Jan 20, 2024 · 2 comments
Open

PG's timezone set syntax is different from other variables #3207

killme2008 opened this issue Jan 20, 2024 · 2 comments

Comments

@killme2008
Copy link
Contributor

killme2008 commented Jan 20, 2024

I just realized PG's timezone is different from other variables: https://www.postgresql.org/docs/current/sql-set.html

SET TIME ZONE '+08:00';
SET TIME ZONE 'Asia/Shanghai';

Maybe we need another PR to align this behavior

Originally posted by @waynexia in #3175 (comment)

@MichaelScofield MichaelScofield added the good first issue Good for newcomers label Feb 26, 2024
@yihong0618
Copy link

kind of go through this issue, I think maybe the better way is update the sqlparser fork (maybe cherry-pick)
for now sqlparser support Statement::SetTimeZone
its kind of simple way to support both MySQL and PG.

refer: https://github.com/sqlparser-rs/sqlparser-rs/pull/727/files

@waynexia
Copy link
Member

waynexia commented Mar 8, 2024

kind of go through this issue, I think maybe the better way is update the sqlparser fork (maybe cherry-pick) for now sqlparser support Statement::SetTimeZone its kind of simple way to support both MySQL and PG.

refer: https://github.com/sqlparser-rs/sqlparser-rs/pull/727/files

Thanks for your information 👍 @Taylor-lagrange has just updated the branch to v0.44.0 compatible https://github.com/GreptimeTeam/sqlparser-rs/tree/v0.44.x. I'm going to bump it with datafusion recently.

@waynexia waynexia removed the good first issue Good for newcomers label Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants