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

plpgsql: implement CONTINUE/EXIT with condition #120686

Merged
merged 1 commit into from Mar 20, 2024

Conversation

DrewKimball
Copy link
Collaborator

PL/pgSQL allows adding a WHEN <condition> clause to EXIT and CONTINUE statements. This is syntactic sugar for EXIT or CONTINUE within an IF statement. This commit add support for this syntax.

Informs #115271

Release note (sql change): It is now possible to specify a condition for the PL/pgSQL statemenets EXIT and CONTINUE.

@DrewKimball DrewKimball requested a review from a team as a code owner March 19, 2024 04:04
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Member

@yuzefovich yuzefovich 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 3 of 3 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @mgartner)

PL/pgSQL allows adding a `WHEN <condition>` clause to `EXIT` and
`CONTINUE` statements. This is syntactic sugar for `EXIT` or `CONTINUE`
within an `IF` statement. This commit add support for this syntax.

Informs cockroachdb#115271

Release note (sql change): It is now possible to specify a condition
for the PL/pgSQL statemenets `EXIT` and `CONTINUE`.
@DrewKimball
Copy link
Collaborator Author

TFYR!

bors r+

@craig
Copy link
Contributor

craig bot commented Mar 20, 2024

@craig craig bot merged commit aa2e1fb into cockroachdb:master Mar 20, 2024
21 of 22 checks passed
@DrewKimball DrewKimball deleted the condition branch March 20, 2024 18:23
Copy link
Collaborator

@mgartner mgartner left a comment

Choose a reason for hiding this comment

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

:lgtm: Cool! Nice and simple :)

Reviewed 1 of 3 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (and 1 stale)

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.

None yet

4 participants