Skip to content

Apply SELECT policies if RETURNING has cols #19720

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

Merged

Conversation

rmloveland
Copy link
Contributor

Fixes DOC-13890

@rmloveland rmloveland requested a review from spilchen June 5, 2025 20:24
Copy link

netlify bot commented Jun 5, 2025

Deploy Preview for cockroachdb-api-docs canceled.

Name Link
🔨 Latest commit 8e17bde
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-api-docs/deploys/685daa8785a4bf0008d68127

Copy link

netlify bot commented Jun 5, 2025

Deploy Preview for cockroachdb-interactivetutorials-docs canceled.

Name Link
🔨 Latest commit 8e17bde
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-interactivetutorials-docs/deploys/685daa8751e8770008994dc8

Copy link

github-actions bot commented Jun 5, 2025

Copy link

netlify bot commented Jun 5, 2025

Netlify Preview

Name Link
🔨 Latest commit 8e17bde
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-docs/deploys/685daa87c0bc460008b4b977
😎 Deploy Preview https://deploy-preview-19720--cockroachdb-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@rmloveland rmloveland requested a review from spilchen June 10, 2025 19:40
@rmloveland rmloveland requested a review from spilchen June 18, 2025 15:29
@rmloveland
Copy link
Contributor Author

thanks for the review comments @spilchen , I've taken a shot at updating based on your latest feedback, PTAL

Copy link

@spilchen spilchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks for revising.

One minor comment, but I'll leave it to you if you want to apply it: I'm wondering if you want to reverse the definition of ✓(b) and ✓(a) since the description of ✓(a) references ✓(b)?

Something like:

  • ✓: Always applied.
  • (a): A USING policy failure causes the statement to fail. Normally, USING filters out rows silently.
  • (b): Like ✓(a), but only applied when the statement references row columns (WHERE, SET, or RETURNING). If the policy is violated, the statement fails.

@rmloveland
Copy link
Contributor Author

Looks good. Thanks for revising.

Thank YOU for reviewing!

One minor comment, but I'll leave it to you if you want to apply it: I'm wondering if you want to reverse the definition of ✓(b) and ✓(a) since the description of ✓(a) references ✓(b)?

Something like:

  • ✓: Always applied.
  • (a): A USING policy failure causes the statement to fail. Normally, USING filters out rows silently.
  • (b): Like ✓(a), but only applied when the statement references row columns (WHERE, SET, or RETURNING). If the policy is violated, the statement fails.

Yes I think that's way clearer! Have swapped (a) and (b) the footnotes and also in the table cells in 805ac45

@rmloveland rmloveland requested a review from taroface June 18, 2025 19:20
Copy link
Contributor

@taroface taroface left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nit, and I'd like to suggest an edit to the part below the bullets, but I need some help understanding it.

@rmloveland rmloveland requested a review from taroface June 25, 2025 14:26
@rmloveland rmloveland force-pushed the 20250605-DOC-13890-update-rls-select-returning-columns branch from bd22d69 to cffad3a Compare June 26, 2025 20:15
@rmloveland
Copy link
Contributor Author

thanks for the reviews! rebased on main to pick up the v25.3 docs and ported the changes from this PR convo to v25.3 as well

@rmloveland rmloveland enabled auto-merge (squash) June 26, 2025 20:16
@rmloveland rmloveland merged commit 860ed0d into main Jun 26, 2025
7 checks passed
@rmloveland rmloveland deleted the 20250605-DOC-13890-update-rls-select-returning-columns branch June 26, 2025 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants