postgresql/src/backend
Tom Lane 3decd150a2 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
2018-01-03 12:35:09 -05:00
..
access Update copyright for 2018 2018-01-02 23:30:12 -05:00
bootstrap Update copyright for 2018 2018-01-02 23:30:12 -05:00
catalog Update copyright for 2018 2018-01-02 23:30:12 -05:00
commands Update copyright for 2018 2018-01-02 23:30:12 -05:00
executor Update copyright for 2018 2018-01-02 23:30:12 -05:00
foreign Update copyright for 2018 2018-01-02 23:30:12 -05:00
lib Update copyright for 2018 2018-01-02 23:30:12 -05:00
libpq Allow ldaps when using ldap authentication 2018-01-03 10:11:26 -05:00
main Update copyright for 2018 2018-01-02 23:30:12 -05:00
nodes Update copyright for 2018 2018-01-02 23:30:12 -05:00
optimizer Teach eval_const_expressions() to handle some more cases. 2018-01-03 12:35:09 -05:00
parser Update copyright for 2018 2018-01-02 23:30:12 -05:00
po Translation updates 2017-08-07 13:55:34 -04:00
port Update copyright for 2018 2018-01-02 23:30:12 -05:00
postmaster Update copyright for 2018 2018-01-02 23:30:12 -05:00
regex Update copyright for 2018 2018-01-02 23:30:12 -05:00
replication Update copyright for 2018 2018-01-02 23:30:12 -05:00
rewrite Update copyright for 2018 2018-01-02 23:30:12 -05:00
snowball Update copyright for 2018 2018-01-02 23:30:12 -05:00
statistics Update copyright for 2018 2018-01-02 23:30:12 -05:00
storage Update copyright for 2018 2018-01-02 23:30:12 -05:00
tcop Update copyright for 2018 2018-01-02 23:30:12 -05:00
tsearch Update copyright for 2018 2018-01-02 23:30:12 -05:00
utils Update copyright for 2018 2018-01-02 23:30:12 -05:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
Makefile Update copyright for 2018 2018-01-02 23:30:12 -05:00
common.mk Add ICU_CFLAGS to global CPPFLAGS 2017-06-12 15:57:22 -04:00
nls.mk Translation updates 2017-05-15 12:19:54 -04:00