Ensure that the result of evaluating a function during constant-expression

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

Commit: b7f1fe6c46c971a89e6a6cfcc629b1ccffeef58f
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2007-10-11T21:28:39Z
Releases: 7.3.21
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.

Files

PathChange+/−
src/backend/optimizer/util/clauses.c modified +14 −3