Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit f453d68

Browse files
committed
Change some internal error messages to elogs
Author: Paul Jungwirth <pj@illuminatedcomputing.com> Reviewed-by: Chapman Flack <chap@anastigmatix.net> Discussion: https://www.postgresql.org/message-id/flat/007ef255-35ef-fd26-679c-f97e7a7f30c2@illuminatedcomputing.com
1 parent fb16d2c commit f453d68

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/backend/utils/adt/multirangetypes.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1345,9 +1345,7 @@ range_agg_transfn(PG_FUNCTION_ARGS)
13451345

13461346
rngtypoid = get_fn_expr_argtype(fcinfo->flinfo, 1);
13471347
if (!type_is_range(rngtypoid))
1348-
ereport(ERROR,
1349-
(errcode(ERRCODE_DATATYPE_MISMATCH),
1350-
errmsg("range_agg must be called with a range")));
1348+
elog(ERROR, "range_agg must be called with a range");
13511349

13521350
if (PG_ARGISNULL(0))
13531351
state = initArrayResult(rngtypoid, aggContext, false);
@@ -1416,9 +1414,7 @@ multirange_intersect_agg_transfn(PG_FUNCTION_ARGS)
14161414

14171415
mltrngtypoid = get_fn_expr_argtype(fcinfo->flinfo, 1);
14181416
if (!type_is_multirange(mltrngtypoid))
1419-
ereport(ERROR,
1420-
(errcode(ERRCODE_DATATYPE_MISMATCH),
1421-
errmsg("range_intersect_agg must be called with a multirange")));
1417+
elog(ERROR, "range_intersect_agg must be called with a multirange");
14221418

14231419
typcache = multirange_get_typcache(fcinfo, mltrngtypoid);
14241420

src/backend/utils/adt/rangetypes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1211,7 +1211,7 @@ range_intersect_agg_transfn(PG_FUNCTION_ARGS)
12111211

12121212
rngtypoid = get_fn_expr_argtype(fcinfo->flinfo, 1);
12131213
if (!type_is_range(rngtypoid))
1214-
ereport(ERROR, (errmsg("range_intersect_agg must be called with a range")));
1214+
elog(ERROR, "range_intersect_agg must be called with a range");
12151215

12161216
typcache = range_get_typcache(fcinfo, rngtypoid);
12171217

0 commit comments

Comments
 (0)