-
Notifications
You must be signed in to change notification settings - Fork 763
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
Postgres' inline power operator has incorrect operator precedence #1555
Comments
I think this is the culprit: sqlglot/sqlglot/dialects/postgres.py Lines 276 to 279 in 6124d0c
It should have higher precedence than factors |
Spent some time trying various things with the parser, but not getting anywhere yet. |
i'm looking at this |
Thanks! |
adrianisk
pushed a commit
to adrianisk/sqlglot
that referenced
this issue
Jun 21, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In Postgres,
x / y ^ z
is parsed as(x / y) ^ z
when it should bex / (y ^ z)
:Docs link: https://www.postgresql.org/docs/15/functions-math.html
Test case in 4eb737d:
sqlglot/tests/dialects/test_postgres.py
Lines 177 to 183 in 4eb737d
The text was updated successfully, but these errors were encountered: