pgsql: Fix EXIT out of outermost block in plpgsql. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Fix EXIT out of outermost block in plpgsql.
Date
Msg-id E1mPp2W-0004gC-Ka@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix EXIT out of outermost block in plpgsql.

Ordinarily, using EXIT this way would draw "control reached end of
function without RETURN".  However, if the function is one where we
don't require an explicit RETURN (such as a DO block), that should
not happen.  It did anyway, because add_dummy_return() neglected to
account for the case.

Per report from Herwig Goemans.  Back-patch to all supported branches.

Discussion: https://postgr.es/m/868ae948-e3ca-c7ec-95a6-83cfc08ef750@gmail.com

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/fe70ec9078a5f20a2bd21687ba31cb351147a113

Modified Files
--------------
src/pl/plpgsql/src/pl_comp.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)


pgsql-committers by date:

Previous
From: Bruce Momjian
Date:
Subject: pgsql: doc: fix PG 14 release note typo
Next
From: Tom Lane
Date:
Subject: pgsql: Doc: improve documentation of CREATE/ALTER SUBSCRIPTION.