Skip to content
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: deprecate "GRANT" privilege #73065

Closed
jackcwu opened this issue Nov 22, 2021 · 0 comments · Fixed by #74210
Closed

sql: deprecate "GRANT" privilege #73065

jackcwu opened this issue Nov 22, 2021 · 0 comments · Fixed by #74210
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)

Comments

@jackcwu
Copy link
Contributor

jackcwu commented Nov 22, 2021

CockroachDB currently has "GRANT" as one of its privileges, which serves as a way to indicate whether a user is able to grant any of the privileges it possesses to another user. However, this is a temporary placeholder for grant options and does not exist as a valid privilege in Postgres (https://www.postgresql.org/docs/14/sql-grant.html)

The addition of the grant options feature (#72123) will be added in version 22.1 and will effectively replace the need for "GRANT"; therefore, the "GRANT" privilege should be deprecated.

In 22.1, the following should happen:

  1. A long-running migration that turns all existing GRANT privileges into GRANT options on whichever privileges the user currently has.
  2. Granting the GRANT privilege should result in a notice saying that the GRANT privilege is deprecated. But if this command is executed, it should give the GRANT option for each privilege the user currently has.
  3. Privilege checks for granting privileges should only be based on the GRANT option.

Epic CRDB-2587

@jackcwu jackcwu added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) labels Nov 22, 2021
@rafiss rafiss changed the title Deprecate "GRANT" privilege sql: deprecate "GRANT" privilege Nov 24, 2021
@craig craig bot closed this as completed in #74210 Dec 23, 2021
@craig craig bot closed this as completed in 8e22c25 Dec 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Projects
None yet
1 participant