aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2020-09-06 12:55:13 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2020-09-06 12:55:44 -0400
commitbaef6e5e9397327e7387f75d903bcf290fd7b3e4 (patch)
tree8dd007dc876f501f0289bfe86e844569ea187fe1 /src
parent75e44b471c511bc2aec0e869ab0d23d249890734 (diff)
downloadpostgresql-baef6e5e9397327e7387f75d903bcf290fd7b3e4.tar.gz
postgresql-baef6e5e9397327e7387f75d903bcf290fd7b3e4.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/backend/catalog/pg_aggregate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/catalog/pg_aggregate.c b/src/backend/catalog/pg_aggregate.c
index 246776093ec..53b5d5f2ee2 100644
--- a/src/backend/catalog/pg_aggregate.c
+++ b/src/backend/catalog/pg_aggregate.c
@@ -560,8 +560,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 */