From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Fix error-cleanup mistakes in exec_stmt_call(). |
Date: | 2018-11-10 03:04:24 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Fix error-cleanup mistakes in exec_stmt_call().
Commit 15c729347 was a couple bricks shy of a load: we need to
ensure that expr->plan gets reset to NULL on any error exit,
if it's not supposed to be saved. Also ensure that the
stmt->target calculation gets redone if needed.
The easy way to exhibit a problem is to set up code that
violates the writable-argument restriction and then execute
it twice. But error exits out of, eg, setup_param_list()
could also break it. Make the existing PG_TRY block cover
all of that code to be sure.
Per report from Pavel Stehule.
Branch
------
REL_11_STABLE
Modified Files
--------------
src/pl/plpgsql/src/pl_exec.c | 82 ++++++++++++++++++++++++--------------------
1 file changed, 45 insertions(+), 37 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2018-11-10 03:30:52 | pgsql: docs: Adapt wal_segment_size docs to fc49e24fa69. |
Previous Message | David Steele | 2018-11-10 02:45:18 | Re: pgsql: Make WAL segment size configurable at initdb time. |