-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Add support for ALTER MATERIALIZED VIEW .. SET AUTHORIZATION #25910
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
Add support for ALTER MATERIALIZED VIEW .. SET AUTHORIZATION #25910
Conversation
5cc1ab4 to
8dbc8e2
Compare
8dbc8e2 to
0329246
Compare
f2630f1 to
b364e10
Compare
kokosing
left a comment
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.
@homar please take a look
kokosing
left a comment
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.
% comments
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.
Why this is needed?
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.
It's not necessary, but it's for keeping the owned entity kind to keep the spaces that MATERIALIZED VIEW has in it. Otherwise, the entity kind string would need to be MATERIALIZEDVIEW. I thought the former was more user friendly.
Happy to revert this change back and use MATERIALIZEDVIEW instead -- I can see the pros and cons of both approach.
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 think it would be better to extract a method and have to @Test methods one per each view kind.
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.
Done!
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.
Way better to review!
|
Are you sure we don't need specific methods for materialized views both in |
I mentioned that in the PR description:
I think you're probably right that it's safer, even if in most cases it'll be the same code. I'll make that change. |
23df798 to
ed9cf76
Compare
This commit adds support for `SET AUTHORIZATION` on a materialized view. Previously, this was only available on views.
ed9cf76 to
99c1447
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.
Way better to review!
|
I retried the failed job, let me know when it becomes green so I will merge it. |
|
@kokosing Thank you for rerunning the failure. It succeeded, is it OK to merge? |
Description
This commit adds support for
SET AUTHORIZATIONon a materialized view. Previously, this was only available on views.In this PR, I reused
checkCanSetViewAuthorizationfor access control for materialized views. Certainly open to creating a new one to differentiate between views & MVs.Additional context and related issues
In this PR support for generic
SET AUTHORIZATIONwas added, but it did not include support for materialized views. Here, we addMATERIALIZED VIEWas a specific owned entity token, and support it in existing set authorization tasks.Release notes
( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
(X) Release notes are required, with the following suggested text: