]> granicus.if.org Git - postgresql/commit
Prevent generating EEOP_AGG_STRICT_INPUT_CHECK operations when nargs == 0.
authorAndres Freund <andres@anarazel.de>
Sat, 3 Nov 2018 22:55:23 +0000 (15:55 -0700)
committerAndres Freund <andres@anarazel.de>
Sat, 3 Nov 2018 22:55:23 +0000 (15:55 -0700)
commit793beab37e8f7ec6a4ef39395c6c866d7e4c7af5
tree229f8bcbf2f5745efb4321bcdb1266612c0078bb
parent4c640f4f38d5d68cbe33ddfabbdc56eea8f1e173
Prevent generating EEOP_AGG_STRICT_INPUT_CHECK operations when nargs == 0.

This only became a problem with 4c640f4f38, which didn't synchronize
the value agg_strict_input_check.nargs is set to, with the guard
condition for emitting the operation.

Besides such instructions being unnecessary overhead, currently the
LLVM JIT provider doesn't support them. It seems more sensible to
avoid generating such instruction than supporting them. Add assertions
to make it easier to debug a potential further occurance.

Discussion: https://postgr.es/m/2a505161-2727-2473-7c46-591ed108ac52@email.cz
Backpatch: 11-, like 4c640f4f38.
src/backend/executor/execExpr.c
src/backend/jit/llvm/llvmjit_expr.c