postgresql/src
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
..
backend Teach eval_const_expressions() to handle some more cases. 2018-01-03 12:35:09 -05:00
bin Update copyright for 2018 2018-01-02 23:30:12 -05:00
common Update copyright for 2018 2018-01-02 23:30:12 -05:00
fe_utils Update copyright for 2018 2018-01-02 23:30:12 -05:00
include Allow ldaps when using ldap authentication 2018-01-03 10:11:26 -05:00
interfaces Update copyright for 2018 2018-01-02 23:30:12 -05:00
makefiles Always use -fPIC, not -fpic, when building shared libraries with gcc. 2017-06-01 13:32:55 -04:00
pl Update copyright for 2018 2018-01-02 23:30:12 -05:00
port Update copyright for 2018 2018-01-02 23:30:12 -05:00
template Force "restrict" not to be used when compiling with xlc. 2017-10-13 12:15:06 -07:00
test Teach eval_const_expressions() to handle some more cases. 2018-01-03 12:35:09 -05:00
timezone Update copyright for 2018 2018-01-02 23:30:12 -05:00
tools Update copyright for 2018 2018-01-02 23:30:12 -05:00
tutorial Update copyright for 2018 2018-01-02 23:30:12 -05:00
.gitignore
DEVELOPERS
Makefile Build src/test/isolation during "make" and "make install". 2017-11-22 20:18:15 -08:00
Makefile.global.in Convert documentation to DocBook XML 2017-11-23 09:44:28 -05:00
Makefile.shlib Remove support for bcc and msvc standalone libpq builds 2017-04-11 15:22:21 +02:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00