-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
117710: plpgsql: add support for nested blocks r=DrewKimball a=DrewKimball #### plpgsql: change order of params and variables Previously, the parameters of a continuation sub-routine would be chosen by first appending the variables of the (single) block, then the parameters of the PL/pgSQL routine. In preparation for supporting nested blocks, this commit changes the order to first add the routine's parameters, and then the variables from the block. This prepares to enforce an invariant that the parameters/arguments of a parent sub-routine are always a prefix of those of a child sub-routine. This will simplify exception handling later on. #### plpgsql: allow early exit for visitor This commit makes two changes to the plpgsql Visitor interface and implementation - first, the `changed` return value has been replaced with pointer comparisons. Second, a new return value, `recurse`, indicates whether a node's children should be visited. This will allow for Visitor implementations that have to return early. #### plpgsql: refactor logic for building PL/pgSQL blocks This commit pulls the logic for handling a PL/pgSQL block into a single method. Information specific to a given block (including a pointer to the parent block) is stored in a new struct, `blockScope`, which is allocated when the block is built. Note that nested blocks are still not allowed in this commit. #### plpgsql: add support for nested blocks This commit makes the final change to support nested blocks with some limitations, and adds corresponding tests. Currently, variable shadowing is not allowed, and a block cannot be nested in another block that has an exception handler. Fixes #114775 Release note (sql change): PL/pgSQL now supports nested blocks, with the following limitations for now: variable shadowing is disallowed, and exception handlers cannot be used in a routine with nested blocks. 118298: ttljob: mark errors as retryable when possible r=rafiss a=rafiss fixes #110823 fixes #117985 Release note: None 118595: roachtest: log when tests use spot VMs r=srosenberg a=renatolabs It's currently not easy to determine which tests used spot VMs in a nightly run. This commit updates the test runner so that, when we decide to run a test with spot VMs, we log that decision. This should make it trivial to check which tests ran on spot VMs in any given run and compare that to the failures observed to get a sense of the failure ratio. Epic: none Release note: None Co-authored-by: Drew Kimball <drewk@cockroachlabs.com> Co-authored-by: Rafi Shamim <rafi@cockroachlabs.com> Co-authored-by: Renato Costa <renato@cockroachlabs.com>
- Loading branch information
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.