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
release-24.1: plpgsql: add support for CALL statements #121743
release-24.1: plpgsql: add support for CALL statements #121743
Conversation
This commit resets the `Builder.insideDataSource` field in the optbuilder when building the body of a routine. This is necessary since a nested routine is not (necessarily) inside a data source, even if its parent it. Fixes #121316 Release note: None
This commit adds support in the PL/pgSQL parser for CALL statements within a PL/pgSQL routine. Informs #120818 Release note: None
This commit adds support for the PL/pgSQL CALL statement. This allows a PL/pgSQL routine to execute a stored procedure. Note that there is a behavior difference vs SQL CALL statements: if the stored procedure has OUT parameters, the surrounding routine passes variables in each OUT parameter position, and the result of the procedure is assigned to those variables. Fixes #120818 Release note (sql change): Added support for PL/pgSQL CALL statements. It is now possible to call a stored procedure from a PL/pgSQL routine.
1998aca
to
5657b73
Compare
Thanks for opening a backport. Please check the backport criteria before merging:
If your backport adds new functionality, please ensure that the following additional criteria are satisfied:
Also, please add a brief release justification to the body of your PR to justify this |
Your pull request contains more than 1000 changes. It is strongly encouraged to split big PRs into smaller chunks. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 3 files at r1, 4 of 4 files at r2, 23 of 23 files at r3, all commit messages.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @DrewKimball, @mgartner, and @stevendanna)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 3 files at r1, 4 of 4 files at r2, 23 of 23 files at r3, all commit messages.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @DrewKimball and @stevendanna)
Merging so that I can backport on top if it. |
Backport 3/3 commits from #121319 on behalf of @DrewKimball.
/cc @cockroachdb/release
opt/optbuilder: reset builder context for nested routines
This commit resets the
Builder.insideDataSource
field in the optbuilderwhen building the body of a routine. This is necessary since a nested
routine is not (necessarily) inside a data source, even if its parent it.
Fixes #121316
Release note: None
plpgsql/parser: add parser support for CALL statements
This commit adds support in the PL/pgSQL parser for CALL statements
within a PL/pgSQL routine.
Informs #120818
Release note: None
plpgsql: implement CALL statements
This commit adds support for the PL/pgSQL CALL statement. This allows
a PL/pgSQL routine to execute a stored procedure. Note that there is
a behavior difference vs SQL CALL statements: if the stored procedure
has OUT parameters, the surrounding routine passes variables in each
OUT parameter position, and the result of the procedure is assigned to
those variables.
Fixes #120818
Release note (sql change): Added support for PL/pgSQL CALL statements.
It is now possible to call a stored procedure from a PL/pgSQL routine.
Release justification: low-risk new functionality