-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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: UserHasAdminRole should return true for the admin role itself #71219
sql: UserHasAdminRole should return true for the admin role itself #71219
Conversation
Thank you for contributing to CockroachDB. Please ensure you have followed the guidelines for creating a PR. Before a member of our team reviews your PR, I have some potential action items for you:
I was unable to automatically find a reviewer. You can try CCing one of the following members:
🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan. |
c8ed0dc
to
e21d3a9
Compare
Thank you for updating your pull request. My owl senses detect your PR is good for review. Please keep an eye out for any test failures in CI. I have added a few people who may be able to assist in reviewing: 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is 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.
ah, i thought we already had tests in place for this, but we don;t
could you add admin
to the test case here:
WHERE usename IN ('super_user', 'regular_user', 'root') |
e21d3a9
to
db7cb62
Compare
Thank you for updating your pull request. My owl senses detect your PR is good for review. Please keep an eye out for any test failures in CI. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan. |
680ed02
to
ef27e19
Compare
I've added `make tesebaselogic FILES='pg_catalog'`
From what i've been able to find out with As following link, vtable iterates roles, and output simply. Therefore, I still can't find out cause of this problem. Though i will do some more research on my end, please give me some advice if you have any ideas. Thanks! |
ef27e19
to
24be1a7
Compare
When populating cockroach/pkg/sql/pg_catalog.go Line 3008 in 6ea317d
From
|
This commit makes `UserHasAdminRole` returns true on the `admin` role for improving introspection. Release note: None
24be1a7
to
a530f6f
Compare
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 see, thanks for that investigation! in that case, this PR looks good! (there are other logictests that look up "admin" in other pg_catalog tables, and those already are correct)
bors r+
Thanks for the great opportunity! This Issue was just right and a good opportunity to look around and learn more! |
Build succeeded: |
This PR makes
planner.UserHasAdminRole
returns true on theadmin
role for improving introspection.This PR had checked by running
make testbaselogic
.Fixes #70779
Release note: None