plpgsql's exec_assign_value() freed the old value of a variable before

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 19cc0c4faf66918d7a1675ec25c0308839e2b9ea
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2005-06-20T20:45:06Z
Releases: 7.3.11
plpgsql's exec_assign_value() freed the old value of a variable before
copying/converting the new value, which meant that it failed badly on
"var := var" if var is of pass-by-reference type.  Fix this and a similar
hazard in exec_move_row(); not sure that the latter can manifest before
8.0, but patch it all the way back anyway.  Per report from Dave Chapeskie.

Files

PathChange+/−
src/pl/plpgsql/src/pl_exec.c modified +31 −17