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: Include policy information in explain output #138824

Open
Tracked by #73596
spilchen opened this issue Jan 10, 2025 · 0 comments
Open
Tracked by #73596

sql: Include policy information in explain output #138824

spilchen opened this issue Jan 10, 2025 · 0 comments
Labels
A-sql-privileges SQL privilege handling and permission checks. 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

@spilchen
Copy link
Contributor

spilchen commented Jan 10, 2025

When you explain a query, we want to surface information about any row-level security (RLS) policies that will apply. It is expected that users will use this output as a way of ensuring the proper RLS policies are in force.

To avoid including too much RLS information, we will only expose it if the VERBOSE option is used.

The output will look something like this:

> explain (verbose) select * from t1;
                                    info
----------------------------------------------------------------------------
...
  row-level security: enabled
  row-level security policies: t1 => permissive [p1, p2]; restrictive [p3]
...

RLS information should be visible for all SELECT, UPDATE, DELETE, INSERT DML.

Jira issue: CRDB-46366

@spilchen spilchen added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) A-sql-privileges SQL privilege handling and permission checks. T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) labels Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-privileges SQL privilege handling and permission checks. 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
Development

No branches or pull requests

1 participant