Ensure that the result of evaluating a function during constant-expression
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 11 Oct 2007 21:28:39 +0000 (21:28 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 11 Oct 2007 21:28:39 +0000 (21:28 +0000)
commitfc69cd3321a83385ace37af37d4b7fcbc34de2af
treed62512c66cadb7800d55a15c913a1d4ad589974e
parent2d44df96449a98cb119a2609b2601b9e6c893a13
Ensure that the result of evaluating a function during constant-expression
simplification gets detoasted before it is incorporated into a Const node.
Otherwise, if an immutable function were to return a TOAST pointer (an
unlikely case, but it can be made to happen), we would end up with a plan
that depends on the continued existence of the out-of-line toast datum.
src/backend/optimizer/util/clauses.c