diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2018-01-03 12:35:09 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2018-01-03 12:35:09 -0500 |
commit | 3decd150a2d5a8f8d43010dd0c207746ba946303 (patch) | |
tree | d4da9e517a2ebd89ff6046f53e21c5e2eef0cb99 /src/backend/executor/nodeHash.c | |
parent | 35c0754fadca8010955f6b10cb47af00bdbe1286 (diff) | |
download | postgresql-3decd150a2d5a8f8d43010dd0c207746ba946303.tar.gz postgresql-3decd150a2d5a8f8d43010dd0c207746ba946303.zip |
Teach eval_const_expressions() to handle some more cases.
Add some infrastructure (mostly macros) to make it easier to write
typical cases for constant-expression simplification. Add simplification
processing for ArrayRef, RowExpr, and ScalarArrayOpExpr node types,
which formerly went unsimplified even if all their inputs were constants.
Also teach it to simplify FieldSelect from a composite constant.
Make use of the new infrastructure to reduce the amount of code needed
for the existing ArrayExpr and ArrayCoerceExpr cases.
One existing test case changes output as a result of the fact that
RowExpr can now be folded to a constant. All the new code is exercised
by existing test cases according to gcov, so I feel no need to add
additional tests.
Tom Lane, reviewed by Dmitry Dolgov
Discussion: https://postgr.es/m/3be3b82c-e29c-b674-2163-bf47d98817b1@iki.fi
Diffstat (limited to 'src/backend/executor/nodeHash.c')
0 files changed, 0 insertions, 0 deletions