]> granicus.if.org Git - postgresql/commit
Teach eval_const_expressions() to simplify an ArrayCoerceExpr to a constant
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 26 Aug 2008 02:16:39 +0000 (02:16 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 26 Aug 2008 02:16:39 +0000 (02:16 +0000)
commita9ff5f07229039cbbef813b7384a35af88058f46
treeeabc1353c11e072e317631ded2d349dae0619a88
parentbc846323d3b83e992086702902548bdd71cfa4ee
Teach eval_const_expressions() to simplify an ArrayCoerceExpr to a constant
when its input is constant and the element coercion function is immutable
(or nonexistent, ie, binary-coercible case).  This is an oversight in the
8.3 implementation of ArrayCoerceExpr, and its result is that certain cases
involving IN or NOT IN with constants don't get optimized as they should be.
Per experimentation with an example from Ow Mun Heng.
src/backend/optimizer/util/clauses.c