Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
68030: sql: implement write path for ALTER ROLE ... SET r=RichardJCai a=rafiss

Touches cockroachdb#21151

ALTER ROLE ... SET will now persist the default settings in the
system.database_role_settings table. The behavior matches Postgres in
the following ways:
- RESET does not validate the setting name.
- SET validates both the name and the proposed default value.
- The defaults are stored in a string array, in key=val format.

The privilege checking is slightly different: we diverge from Postgres
by prohibiting users from modifying their own defaults unless they
have CREATEROLE. This is analogous to our restriction that prevents
a user from modifying their own password.

There is no release note since this does not yet affect any
user-behavior. Everything in this commit is write-only

Release note: None

Co-authored-by: Rafi Shamim <[email protected]>
  • Loading branch information
craig[bot] and rafiss committed Jul 28, 2021
2 parents 4c231cd + 454565b commit 1b60983
Show file tree
Hide file tree
Showing 11 changed files with 653 additions and 14 deletions.
14 changes: 7 additions & 7 deletions pkg/bench/rttanalysis/testdata/benchmark_expectations
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ exp,benchmark
24,CreateRole/create_role_with_2_options
25,CreateRole/create_role_with_3_options
23,CreateRole/create_role_with_no_options
20,DropDatabase/drop_database_0_tables
29,DropDatabase/drop_database_1_table
38,DropDatabase/drop_database_2_tables
47,DropDatabase/drop_database_3_tables
28,DropRole/drop_1_role
34,DropRole/drop_2_roles
40,DropRole/drop_3_roles
22,DropDatabase/drop_database_0_tables
31,DropDatabase/drop_database_1_table
40,DropDatabase/drop_database_2_tables
49,DropDatabase/drop_database_3_tables
30,DropRole/drop_1_role
37,DropRole/drop_2_roles
44,DropRole/drop_3_roles
19,DropSequence/drop_1_sequence
27,DropSequence/drop_2_sequences
35,DropSequence/drop_3_sequences
Expand Down
Loading

0 comments on commit 1b60983

Please sign in to comment.