aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeAgg.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-07-21 17:05:12 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-07-21 17:05:12 +0000
commit5e6d691e0daf18fcb5ae13e2252536df416668aa (patch)
tree2adf07e9e52286028ab21fba66fc478f995d58ee /src/backend/executor/nodeAgg.c
parent82f18c4a2c7297f520051a50ee028d532a4b5ced (diff)
downloadpostgresql-5e6d691e0daf18fcb5ae13e2252536df416668aa.tar.gz
postgresql-5e6d691e0daf18fcb5ae13e2252536df416668aa.zip
Error message editing in backend/executor.
Diffstat (limited to 'src/backend/executor/nodeAgg.c')
-rw-r--r--src/backend/executor/nodeAgg.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c
index b54d528eeaf..9c3481379a3 100644
--- a/src/backend/executor/nodeAgg.c
+++ b/src/backend/executor/nodeAgg.c
@@ -45,7 +45,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeAgg.c,v 1.110 2003/07/01 19:10:52 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeAgg.c,v 1.111 2003/07/21 17:05:09 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1233,7 +1233,7 @@ ExecInitAgg(Agg *node, EState *estate)
ObjectIdGetDatum(aggref->aggfnoid),
0, 0, 0);
if (!HeapTupleIsValid(aggTuple))
- elog(ERROR, "ExecAgg: cache lookup failed for aggregate %u",
+ elog(ERROR, "cache lookup failed for aggregate %u",
aggref->aggfnoid);
aggform = (Form_pg_aggregate) GETSTRUCT(aggTuple);
@@ -1311,8 +1311,10 @@ ExecInitAgg(Agg *node, EState *estate)
if (peraggstate->transfn.fn_strict && peraggstate->initValueIsNull)
{
if (!IsBinaryCoercible(inputType, aggtranstype))
- elog(ERROR, "Aggregate %u needs to have compatible input type and transition type",
- aggref->aggfnoid);
+ ereport(ERROR,
+ (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION),
+ errmsg("aggregate %u needs to have compatible input type and transition type",
+ aggref->aggfnoid)));
}
if (aggref->aggdistinct)
@@ -1357,7 +1359,7 @@ GetAggInitVal(Datum textInitVal, Oid transtype)
ObjectIdGetDatum(transtype),
0, 0, 0);
if (!HeapTupleIsValid(tup))
- elog(ERROR, "GetAggInitVal: cache lookup failed on aggregate transition function return type %u", transtype);
+ elog(ERROR, "cache lookup failed for type %u", transtype);
typinput = ((Form_pg_type) GETSTRUCT(tup))->typinput;
typelem = ((Form_pg_type) GETSTRUCT(tup))->typelem;
@@ -1494,7 +1496,7 @@ ExecReScanAgg(AggState *node, ExprContext *exprCtxt)
Datum
aggregate_dummy(PG_FUNCTION_ARGS)
{
- elog(ERROR, "Aggregate function %u called as normal function",
+ elog(ERROR, "aggregate function %u called as normal function",
fcinfo->flinfo->fn_oid);
return (Datum) 0; /* keep compiler quiet */
}