plpgsql: error for txn control inside exception-handling block is eager #119750
Labels
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
T-sql-queries
SQL Queries Team
This is a tracking issue for a difference in behavior between CRDB and postgres. Postgres does not allow COMMIT or ROLLBACK statements inside a PL/pgSQL block that has an exception handler. However, postgres checks this condition lazily, so that the error is only thrown if the transaction control statement is actually executed:
CRDB eagerly checks for this situation, and throws the error in response to the
CREATE PROCEDURE
statement instead. This behavior is unlikely to change because users are unlikely to want to write such a stored procedure.Jira issue: CRDB-36295
The text was updated successfully, but these errors were encountered: