OSDN Git Service

Fix inline_set_returning_function() to preserve the invalItems list properly.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 25 Oct 2010 17:04:42 +0000 (13:04 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 25 Oct 2010 17:04:42 +0000 (13:04 -0400)
commit113082c6579f3310ecaa6a5cba2e24a0ce325b5d
tree32d4a5276cee5a5a6fbce61b174634d2fe7c6e0a
parentae9ac79b39d5ce0c28e13c47261d925b61701b66
Fix inline_set_returning_function() to preserve the invalItems list properly.

This avoids a possible crash when inlining a SRF whose argument list
contains a reference to an inline-able user function.  The crash is quite
reproducible with CLOBBER_FREED_MEMORY enabled, but would be less certain
in a production build.  Problem introduced in 9.0 by the named-arguments
patch, which requires invoking eval_const_expressions() before we can try
to inline a SRF.  Per report from Brendan Jurd.
src/backend/optimizer/util/clauses.c