pgsql: Fix incorrect logic in plpgsql for cleanup after evaluation of - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Fix incorrect logic in plpgsql for cleanup after evaluation of
Date
Msg-id 20100809185054.F062A7541D7@cvs.postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
Fix incorrect logic in plpgsql for cleanup after evaluation of non-simple
expressions.  We need to deal with this when handling subscripts in an array
assignment, and also when catching an exception.  In an Assert-enabled build
these omissions led to Assert failures, but I think in a normal build the
only consequence would be short-term memory leakage; which may explain why
this wasn't reported from the field long ago.

Back-patch to all supported versions.  7.4 doesn't have exceptions, but
otherwise these bugs go all the way back.

Heikki Linnakangas and Tom Lane

Tags:
----
REL8_1_STABLE

Modified Files:
--------------
    pgsql/src/pl/plpgsql/src:
        pl_exec.c (r1.154.2.11 -> r1.154.2.12)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/pl_exec.c?r1=1.154.2.11&r2=1.154.2.12)
    pgsql/src/test/regress/expected:
        plpgsql.out (r1.40.2.2 -> r1.40.2.3)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/plpgsql.out?r1=1.40.2.2&r2=1.40.2.3)
    pgsql/src/test/regress/sql:
        plpgsql.sql (r1.34.2.2 -> r1.34.2.3)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/plpgsql.sql?r1=1.34.2.2&r2=1.34.2.3)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix incorrect logic in plpgsql for cleanup after evaluation of
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix incorrect logic in plpgsql for cleanup after evaluation of