]> granicus.if.org Git - postgresql/commit
Fix incorrect logic in plpgsql for cleanup after evaluation of non-simple
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 9 Aug 2010 18:51:02 +0000 (18:51 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 9 Aug 2010 18:51:02 +0000 (18:51 +0000)
commitd3e41cb498b392078c6b99de9970312d018b99a3
tree6404460329963a96bca96ddd8f20b050df4ee100
parent1eef280d6186782b4adfbd6a9cb97413f7c46b8b
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
src/pl/plpgsql/src/pl_exec.c
src/test/regress/expected/plpgsql.out
src/test/regress/sql/plpgsql.sql