Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Adds REASSIGN OWNED BY propagation #7319
Adds REASSIGN OWNED BY propagation #7319
Changes from 2 commits
d6ecac4
aff3f3f
6426087
76e5de9
da900cf
557dd71
f342793
f255643
f1f7313
b598b48
e39c15f
aed2035
c7a98ac
2fec02c
7632e5d
3600f22
7433b79
4ac5d0d
9f82b16
6adac3a
e825d29
b5b6ecd
c199c01
059081e
e01d85b
b62a958
9314ac8
80b90d6
f2ebc68
f49d429
29e77ed
5aa542e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Should we have this in Postprocess instead?
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.
There is no reason to move this to Postprocess actually. It just prepares the command.
Normally when you check other statements who is in the nature of Alter like PreprocessAlterDatabaseStmt, we use Preprocess
Create needs to have Post since address only exists after local execution, Drop needs to be Pre since address is missing after local drop execution.
For Alter style statements, there is no such requirement.
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.
let's get this into postprocess as we've discussed in group chat, due to reasons discussed there
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.
(discussion in group chat was still on-going indeed)
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.
need to move this down to Postprocess phase
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.
Fixed
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.
Should remove filtering logic as we've discussed two weeks ago.
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.
We decided to keep the filtering logic
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.
minor;
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.
without const I'm getting compile warning below
deparser/deparse_owned_stmts.c:94:22: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
94 | char *newRoleName = RoleSpecString(stmt->newrole, 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.
let's do
const char
instead ofchar const
as we usually do then?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.
please let's not forget changing this, see #7319 (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.
Regardless of what we decide to do with the scenarios C1,C2,C3,C4,C5,C6,
we should have at least one test for each scenario. And also we should ensure to have test cases with >1 role in the BY clause, e.g. 2 roles:
REASSIGN OWNED BY role0, role1 TO role2;
As always, let's also add tests where the role names have escaped characters :)
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.
Added tests for distributed and non-distributed roles with escape characters