-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
has_sequence_privilege(..., 'USAGE') incorrectly using SELECT #82465
Labels
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
T-sql-foundations
SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Projects
Comments
ecwall
added
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
T-sql-foundations
SQL Foundations Team (formerly SQL Schema + SQL Sessions)
labels
Jun 6, 2022
I believe this only affects v22.2, since sequence privileges are new (#79862), but we should confirm |
ZhouXing19
added a commit
to ZhouXing19/cockroach
that referenced
this issue
Jun 6, 2022
From cockroachdb#79862 on we support the `USAGE` privilege on sequence. This commit is to fix the `has_sequence_privilege()` builtin function on checking the `USAGE` privilege on sequences. fixes cockroachdb#82465 Release note (sql change): fix `has_sequence_privilege()` on `USAGE` privilege
Will be fixed by #82458 as well |
ZhouXing19
added a commit
to ZhouXing19/cockroach
that referenced
this issue
Jun 14, 2022
From cockroachdb#79862 on we support the `USAGE` privilege on sequence. This commit is to fix the `has_sequence_privilege()` builtin function on checking the `USAGE` privilege on sequences. fixes cockroachdb#82465 Release note (sql change): fix `has_sequence_privilege()` on `USAGE` privilege
ZhouXing19
added a commit
to ZhouXing19/cockroach
that referenced
this issue
Jun 14, 2022
From cockroachdb#79862 on we support the `USAGE` privilege on sequence. This commit is to fix the `has_sequence_privilege()` builtin function on checking the `USAGE` privilege on sequences. fixes cockroachdb#82465 Release note (sql change): fix `has_sequence_privilege()` on `USAGE` privilege
craig bot
pushed a commit
that referenced
this issue
Jun 22, 2022
82458: sql: add logic for `GRANT ... ON seq_names` r=rafiss a=ZhouXing19 Currently, the `GRANT ... ON names` syntax by default take all the target as table, while in Postgres 14, the `names` field accepts names for both table and sequence. This commit is to add similar sementics. Given that a table's privilege list is the subset of a sequence's, if the targets list contains any table, the allowed privilege should be the table privilege. Only when all targets are of the type sequence, the allowed list is the sequence privilege. Since the target list may contain both tables and sequences, when validating, we need to sepcify the privilege type for each target descriptor. fixes #82414 fixes #82465 Release note (sql): add logic for GRANT ... ON seq_names 82694: lint: minor cleanup r=andreimatei a=andreimatei I had screwed up in a previous patch and left the logic for checking the license headers in a duplicate state. Deleting some lines redundant with what's right above them. Release note: None Co-authored-by: Jane Xing <zhouxing@uchicago.edu> Co-authored-by: Andrei Matei <andrei@cockroachlabs.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
T-sql-foundations
SQL Foundations Team (formerly SQL Schema + SQL Sessions)
It looks like
USAGE
can be granted to sequences so this should be updated to reflect that.Jira issue: CRDB-16409
Epic CRDB-14491
The text was updated successfully, but these errors were encountered: