diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-07-24 17:52:50 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-07-24 17:52:50 +0000 |
| commit | 8fd5b3ed67d91937516d855bd6f225052aa88f2a (patch) | |
| tree | 5f14c30cb79692b6d35e612ed97feb79f62a155d /contrib/intagg | |
| parent | f0c5384d4a21d85198f86281f61d5754bfdca7a5 (diff) | |
| download | postgresql-8fd5b3ed67d91937516d855bd6f225052aa88f2a.tar.gz | |
Error message editing in contrib (mostly by Joe Conway --- thanks Joe!)
Diffstat (limited to 'contrib/intagg')
| -rw-r--r-- | contrib/intagg/int_aggregate.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/contrib/intagg/int_aggregate.c b/contrib/intagg/int_aggregate.c index 9f4b5d0918..4614b669a7 100644 --- a/contrib/intagg/int_aggregate.c +++ b/contrib/intagg/int_aggregate.c @@ -160,8 +160,10 @@ int_agg_state(PG_FUNCTION_ARGS) PGARRAY *p = GetPGArray(state, 1); if (!p) - elog(ERROR, "No aggregate storage"); + /* internal error */ + elog(ERROR, "no aggregate storage"); else if (p->items >= p->lower) + /* internal error */ elog(ERROR, "aggregate storage too small"); else p->array[p->items++] = value; @@ -190,11 +192,13 @@ int_enum(PG_FUNCTION_ARGS) ReturnSetInfo *rsi = (ReturnSetInfo *) fcinfo->resultinfo; if (!rsi || !IsA(rsi, ReturnSetInfo)) - elog(ERROR, "No ReturnSetInfo sent! function must be declared returning a 'setof' integer"); + ereport(ERROR, + (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("int_enum called in context that cannot accept a set"))); if (!p) { - elog(WARNING, "No data sent"); + elog(WARNING, "no data sent"); PG_RETURN_NULL(); } @@ -211,7 +215,8 @@ int_enum(PG_FUNCTION_ARGS) pc->flags = TOASTED; if (!pc->p) { - elog(ERROR, "Error in toaster!!! no detoasting"); + /* internal error */ + elog(ERROR, "error in toaster; not detoasting"); PG_RETURN_NULL(); } } |
