postgres.git / summary / log / commit / refs
commit 2939f613fa91f12b43d51eb8c4e595d5164e5254
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: Sun Sep 06 16:55:13 2020 +0000
First released in: 14.0, 9.5.24, 9.6.20, 10.15, 11.10, 12.5, 13.0
Fix misleading error message about inconsistent moving-aggregate types.
We reported the wrong types when complaining that an aggregate's
moving-aggregate implementation is inconsistent with its regular
implementation.
This was wrong since the feature was introduced, so back-patch
to all supported branches.
Jeff Janes
Discussion: https://postgr.es/m/CAMkU=1x808LH=LPhZp9mNSP0Xd1xDqEd+XeGcvEe48dfE6xV=A@mail.gmail.com
src/backend/catalog/pg_aggregate.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/catalog/pg_aggregate.c b/src/backend/catalog/pg_aggregate.c
index 40c56543ca0..61c20617c87 100644
--- a/src/backend/catalog/pg_aggregate.c
+++ b/src/backend/catalog/pg_aggregate.c
@@ -559,8 +559,8 @@ AggregateCreate(const char *aggName,
ereport(ERROR,
(errcode(ERRCODE_INVALID_FUNCTION_DEFINITION),
errmsg("moving-aggregate implementation returns type %s, but plain implementation returns type %s",
- format_type_be(aggmTransType),
- format_type_be(aggTransType))));
+ format_type_be(rettype),
+ format_type_be(finaltype))));
}
/* handle sortop, if supplied */
[parent: 1f8c163c5acd]