Skip to content

release-25.3: optbuilder: prohibit some operations on REFCURSOR #149292

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

Conversation

yuzefovich
Copy link
Member

@yuzefovich yuzefovich commented Jun 30, 2025

Backport 1/1 commits from #148863 on behalf of @yuzefovich.


Postgres doesn't allow ordering by and equality comparison on refcursor columns, so this commit adds checks to match that behavior.

Fixes: #145477.

Release note (bug fix): CockroachDB now prohibits ORDER BY and join equality operations on REFCURSOR type, matching behavior of Postgres.


Release justification: low-risk bug fix.

@yuzefovich yuzefovich requested review from a team as code owners June 30, 2025 23:15
@blathers-crl blathers-crl bot added blathers-backport This is a backport that Blathers created automatically. O-robot Originated from a bot. labels Jun 30, 2025
@yuzefovich yuzefovich requested review from mw5h and removed request for a team June 30, 2025 23:15
@blathers-crl blathers-crl bot requested a review from DrewKimball June 30, 2025 23:15
Copy link

blathers-crl bot commented Jun 30, 2025

Thanks for opening a backport.

Before merging, please confirm that the change does not break backwards compatibility and otherwise complies with the backport policy. Include a brief release justification in the PR description explaining why the backport is appropriate. All backports must be reviewed by the TL for the owning area. While the stricter LTS policy does not yet apply, please exercise judgment and consider gating non-critical changes behind a disabled-by-default feature flag when appropriate.

@blathers-crl blathers-crl bot added the backport Label PR's that are backports to older release branches label Jun 30, 2025
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@yuzefovich yuzefovich requested review from michae2 and removed request for mw5h June 30, 2025 23:24
@yuzefovich
Copy link
Member Author

Hm, looks like one adjusted test is now flaky.

Postgres doesn't allow ordering by and equality comparison on refcursor
columns, so this commit adds checks to match that behavior.

Release note (bug fix): CockroachDB now prohibits ORDER BY and join
equality operations on REFCURSOR type, matching behavior of Postgres.
@yuzefovich yuzefovich force-pushed the blathers/backport-release-25.3-148863 branch from ba1fb24 to 7a4b3e6 Compare July 1, 2025 01:41
Copy link
Collaborator

@michae2 michae2 left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 6 of 6 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @DrewKimball)

@yuzefovich yuzefovich merged commit 84aecdc into cockroachdb:release-25.3 Jul 1, 2025
15 checks passed
@yuzefovich yuzefovich deleted the blathers/backport-release-25.3-148863 branch July 1, 2025 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Label PR's that are backports to older release branches blathers-backport This is a backport that Blathers created automatically. O-robot Originated from a bot. target-release-25.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants