Reset the per-output-tuple exprcontext each time through the main loop in
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 18 Aug 2010 21:52:24 +0000 (21:52 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 18 Aug 2010 21:52:24 +0000 (21:52 +0000)
commit3573c8346d4c1683c7052e44323abe14fb337e70
tree2c7d9a79405ff28802a97d4581b615fc808f749b
parent2d8314bd43663b7ef45628d283dc5c6c10a60a75
Reset the per-output-tuple exprcontext each time through the main loop in
ExecModifyTable().  This avoids memory leakage when trigger functions leave
junk behind in that context (as they more or less must).  Problem and solution
identified by Dean Rasheed.

I'm a bit concerned about the longevity of this solution --- once a plan can
have multiple ModifyTable nodes, we are very possibly going to have to do
something different.  But it should hold up for 9.0.
src/backend/executor/nodeModifyTable.c