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
sql: support RULE privilege for compatibility #73960
Conversation
---- | ||
true true true true true true true true true | ||
true true true true true true true true true true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm still thinking about this -- some of these return true for RULE because the user has ALL privileges. i'm wondering if we should special-case RULE in the has_table_privilege implementation so it just always returns false.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @otan ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i changed it to always return false
The RULE privilege is legacy in Postgres, but some tools expect the has_table_privilege function to work. Release note (sql change): The RULE privilege was added for compatbility with Postgres. It is impossible to grant it, but it is supported as a parameter of the has_table_privilege function.
4625fab
to
95c3716
Compare
I would do what postgres doesin the ALL case. I understand the argument both ways but I guess when I come back to is that if we're following pg compat then we should match pg. |
tftr! merging after unrelated flake bors r=otan |
Build succeeded: |
can this be backported to 21.2? it would unblock a customer who's trying to use a tool that relies on this, but not sure how risky it is |
don't see why not |
fixes #72832
The RULE privilege is legacy in Postgres, but some tools expect
the has_table_privilege function to work.
Release note (sql change): The RULE privilege was added for compatbility
with Postgres. It is impossible to grant it, but it is supported as a
parameter of the has_table_privilege function.