aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2018-11-03 14:35:23 -0700
committerAndres Freund <andres@anarazel.de>2018-11-03 14:48:42 -0700
commit4c640f4f38d5d68cbe33ddfabbdc56eea8f1e173 (patch)
tree46c8fad53711e6744a428c51e56844d9bc92ec1f /src/backend/executor
parent981dc2baa8e08483bfe4b20f9e5ab3cad711ba98 (diff)
downloadpostgresql-4c640f4f38d5d68cbe33ddfabbdc56eea8f1e173.tar.gz
postgresql-4c640f4f38d5d68cbe33ddfabbdc56eea8f1e173.zip
Fix STRICT check for strict aggregates with NULL ORDER BY columns.
I (Andres) broke this unintentionally in 69c3936a14, by checking strictness for all input expressions computed for an aggregate, rather than just the input for the aggregate transition function. Reported-By: Ondřej Bouda Bisected-By: Tom Lane Diagnosed-By: Andrew Gierth Discussion: https://postgr.es/m/2a505161-2727-2473-7c46-591ed108ac52@email.cz Backpatch: 11-, like 69c3936a14
Diffstat (limited to 'src/backend/executor')
-rw-r--r--src/backend/executor/execExpr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/executor/execExpr.c b/src/backend/executor/execExpr.c
index c5e8634aeda..5397de4e050 100644
--- a/src/backend/executor/execExpr.c
+++ b/src/backend/executor/execExpr.c
@@ -3028,7 +3028,7 @@ ExecBuildAggTrans(AggState *aggstate, AggStatePerPhase phase,
scratch.opcode = EEOP_AGG_STRICT_INPUT_CHECK;
scratch.d.agg_strict_input_check.nulls = strictnulls;
scratch.d.agg_strict_input_check.jumpnull = -1; /* adjust later */
- scratch.d.agg_strict_input_check.nargs = numInputs;
+ scratch.d.agg_strict_input_check.nargs = pertrans->numTransInputs;
ExprEvalPushStep(state, &scratch);
adjust_bailout = lappend_int(adjust_bailout,
state->steps_len - 1);