Ensure that the result of evaluating a function during constant-expression
Tom Lane <tgl@sss.pgh.pa.us>
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
| Path | Change | +/− |
|---|---|---|
| src/backend/optimizer/util/clauses.c | modified | +14 −3 |