@@ -961,7 +961,7 @@ multirange_constructor2(PG_FUNCTION_ARGS)
961961
962962 if (PG_ARGISNULL (0 ))
963963 elog (ERROR ,
964- "multirange values cannot contain NULL members" );
964+ "multirange values cannot contain null members" );
965965
966966 rangeArray = PG_GETARG_ARRAYTYPE_P (0 );
967967
@@ -973,9 +973,7 @@ multirange_constructor2(PG_FUNCTION_ARGS)
973973
974974 rngtypid = ARR_ELEMTYPE (rangeArray );
975975 if (rngtypid != rangetyp -> type_id )
976- ereport (ERROR ,
977- (errcode (ERRCODE_DATATYPE_MISMATCH ),
978- errmsg ("type %u does not match constructor type" , rngtypid )));
976+ elog (ERROR , "type %u does not match constructor type" , rngtypid );
979977
980978 /*
981979 * Be careful: we can still be called with zero ranges, like this:
@@ -997,7 +995,7 @@ multirange_constructor2(PG_FUNCTION_ARGS)
997995 if (nulls [i ])
998996 ereport (ERROR ,
999997 (errcode (ERRCODE_NULL_VALUE_NOT_ALLOWED ),
1000- errmsg ("multirange values cannot contain NULL members" )));
998+ errmsg ("multirange values cannot contain null members" )));
1001999
10021000 /* make_multirange will do its own copy */
10031001 ranges [i ] = DatumGetRangeTypeP (elements [i ]);
@@ -1031,16 +1029,14 @@ multirange_constructor1(PG_FUNCTION_ARGS)
10311029
10321030 if (PG_ARGISNULL (0 ))
10331031 elog (ERROR ,
1034- "multirange values cannot contain NULL members" );
1032+ "multirange values cannot contain null members" );
10351033
10361034 range = PG_GETARG_RANGE_P (0 );
10371035
10381036 /* Make sure the range type matches. */
10391037 rngtypid = RangeTypeGetOid (range );
10401038 if (rngtypid != rangetyp -> type_id )
1041- ereport (ERROR ,
1042- (errcode (ERRCODE_DATATYPE_MISMATCH ),
1043- errmsg ("type %u does not match constructor type" , rngtypid )));
1039+ elog (ERROR , "type %u does not match constructor type" , rngtypid );
10441040
10451041 PG_RETURN_MULTIRANGE_P (make_multirange (mltrngtypid , rangetyp , 1 , & range ));
10461042}
0 commit comments