Skip to content

plpgsql: integrate PLpgSQL cursors with the REFCURSOR data type#111815

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
DrewKimball:integrate-refcursor
Oct 6, 2023
Merged

plpgsql: integrate PLpgSQL cursors with the REFCURSOR data type#111815
craig[bot] merged 1 commit intocockroachdb:masterfrom
DrewKimball:integrate-refcursor

Conversation

@DrewKimball
Copy link
Copy Markdown
Collaborator

plpgsql: integrate PLpgSQL cursors with the REFCURSOR data type

This patch integrates the REFCURSOR data type (added in #111392)
with the PLpgSQL OPEN, CLOSE, FETCH, and MOVE statements, which now
require the cursor variable to have type REFCURSOR instead of STRING.
Attempts to use a variable of another type will result in an error
like the following:

variable "curs" must be of type cursor or refcursor

Informs #109709

Release note: None

@DrewKimball DrewKimball requested review from a team as code owners October 5, 2023 05:23
@DrewKimball DrewKimball requested a review from a team October 5, 2023 05:23
@DrewKimball DrewKimball requested a review from a team as a code owner October 5, 2023 05:23
@DrewKimball DrewKimball requested review from michae2, renatolabs and smg260 and removed request for a team October 5, 2023 05:23
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@DrewKimball DrewKimball requested review from a team, mgartner and rharding6373 and removed request for a team, michae2, renatolabs and smg260 October 5, 2023 05:24
@DrewKimball
Copy link
Copy Markdown
Collaborator Author

The first 3 commits are from #111392.

@DrewKimball DrewKimball force-pushed the integrate-refcursor branch 3 times, most recently from 8ac4633 to 7684502 Compare October 5, 2023 06:09
Copy link
Copy Markdown
Collaborator

@rharding6373 rharding6373 left a comment

Choose a reason for hiding this comment

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

:lgtm: Nice!

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @mgartner)

This patch integrates the `REFCURSOR` data type (added in cockroachdb#111392)
with the PLpgSQL OPEN, CLOSE, FETCH, and MOVE statements, which now
require the cursor variable to have type `REFCURSOR` instead of `STRING`.
Attempts to use a variable of another type will result in an error
like the following:
```
variable "curs" must be of type cursor or refcursor
```

Informs cockroachdb#109709

Release note: None
@DrewKimball
Copy link
Copy Markdown
Collaborator Author

TFTR!

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Oct 6, 2023

Build succeeded:

@craig craig bot merged commit b28fa0d into cockroachdb:master Oct 6, 2023
@DrewKimball DrewKimball deleted the integrate-refcursor branch October 6, 2023 02:20
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