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: set session authorization 'foo' unsupported #40283

Open
jordanlewis opened this issue Aug 28, 2019 · 0 comments
Open

sql: set session authorization 'foo' unsupported #40283

jordanlewis opened this issue Aug 28, 2019 · 0 comments
Labels
A-sql-pgcompat Semantic compatibility with PostgreSQL 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) X-anchored-telemetry The issue number is anchored by telemetry references.

Comments

@jordanlewis
Copy link
Member

jordanlewis commented Aug 28, 2019

SET SESSION AUTHORIZATION DEFAULT is supported in 19.2 and onward for compatibility, but not SET SESSION AUTHORIZATION 'foo'. The former is a no-op, the latter is not implemented yet.

CockroachDB does support SET ROLE ..., which is a command that just changes the "current user." SET SESSION AUTHORIZATION ... on the other hand, changes both the "current user" and the "session user."

To implement this, CockroachDB will need to keep track of 3 different usernames for the session:

  • the current user - modified by SET ROLE and SET SESSION AUTHORIZATION
  • the session user - modified by SET SESSION AUTHORIZATION
  • the original user - never modified, but used to reset the session user

https://www.postgresql.org/docs/current/sql-set-session-authorization.html

When we add support, make sure to address #105136

Jira issue: CRDB-5553

@jordanlewis jordanlewis added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) A-sql-pgcompat Semantic compatibility with PostgreSQL X-anchored-telemetry The issue number is anchored by telemetry references. labels Aug 28, 2019
@jordanlewis jordanlewis moved this from Triage to Lower priority backlog in [DEPRECATED] Old SQLExec board. Don't move stuff here Sep 3, 2019
@asubiotto asubiotto moved this from Lower priority backlog to [TENT] SQL Features in [DEPRECATED] Old SQLExec board. Don't move stuff here Apr 2, 2020
@rafiss rafiss added this to Triage in SQL Sessions - Deprecated via automation May 19, 2022
@blathers-crl blathers-crl bot added the T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) label May 19, 2022
@rafiss rafiss moved this from Triage to Shorter term backlog in SQL Sessions - Deprecated May 19, 2022
@knz knz added this to Triage in SQL Foundations via automation Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-pgcompat Semantic compatibility with PostgreSQL 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) X-anchored-telemetry The issue number is anchored by telemetry references.
Projects
SQL Foundations
  
Triage
Development

No branches or pull requests

1 participant