Commits

Peter Eisentraut  committed 740ee42

Make some messages more consistent in style

  • Participants
  • Parent commits a0bfb7b
  • Branches jsonbuild, master

Comments (0)

Files changed (4)

File src/backend/catalog/pg_proc.c

 		ereport(ERROR,
 				(errcode(ERRCODE_INVALID_FUNCTION_DEFINITION),
 				 errmsg("cannot determine result data type"),
-				 errdetail("A function returning ANYRANGE must have at least one ANYRANGE argument.")));
+				 errdetail("A function returning \"anyrange\" must have at least one \"anyrange\" argument.")));
 
 	if ((returnType == INTERNALOID || internalOutParam) && !internalInParam)
 		ereport(ERROR,

File src/backend/commands/vacuumlazy.c

 							"pages: %d removed, %d remain\n"
 							"tuples: %.0f removed, %.0f remain\n"
 							"buffer usage: %d hits, %d misses, %d dirtied\n"
-					"avg read rate: %.3f MiB/s, avg write rate: %.3f MiB/s\n"
+					"avg read rate: %.3f MB/s, avg write rate: %.3f MB/s\n"
 							"system usage: %s",
 							get_database_name(MyDatabaseId),
 							get_namespace_name(RelationGetNamespace(onerel)),

File src/backend/parser/parse_coerce.c

 			if (!OidIsValid(range_typelem))
 				ereport(ERROR,
 						(errcode(ERRCODE_DATATYPE_MISMATCH),
-						 errmsg("argument declared \"anyrange\" is not a range but type %s",
+						 errmsg("argument declared \"anyrange\" is not a range type but type %s",
 								format_type_be(range_typeid))));
 		}
 
 			if (!OidIsValid(range_typelem))
 				ereport(ERROR,
 						(errcode(ERRCODE_DATATYPE_MISMATCH),
-						 errmsg("argument declared \"anyrange\" is not a range but type %s",
+						 errmsg("argument declared \"anyrange\" is not a range type but type %s",
 								format_type_be(context_base_type))));
 			return range_typelem;
 		}

File src/test/regress/expected/rangetypes.out

 create function bogus_func(anyelement)
   returns anyrange as 'select int4range(1,10)' language sql;
 ERROR:  cannot determine result data type
-DETAIL:  A function returning ANYRANGE must have at least one ANYRANGE argument.
+DETAIL:  A function returning "anyrange" must have at least one "anyrange" argument.
 -- should fail
 create function bogus_func(int)
   returns anyrange as 'select int4range(1,10)' language sql;
 create function outparam_fail(i anyelement, out r anyrange, out t text)
   as $$ select '[1,10]', 'foo' $$ language sql;
 ERROR:  cannot determine result data type
-DETAIL:  A function returning ANYRANGE must have at least one ANYRANGE argument.
+DETAIL:  A function returning "anyrange" must have at least one "anyrange" argument.
 --should fail
 create function inoutparam_fail(inout i anyelement, out r anyrange)
   as $$ select $1, '[1,10]' $$ language sql;
 ERROR:  cannot determine result data type
-DETAIL:  A function returning ANYRANGE must have at least one ANYRANGE argument.
+DETAIL:  A function returning "anyrange" must have at least one "anyrange" argument.
 --should fail
 create function table_fail(i anyelement) returns table(i anyelement, r anyrange)
   as $$ select $1, '[1,10]' $$ language sql;
 ERROR:  cannot determine result data type
-DETAIL:  A function returning ANYRANGE must have at least one ANYRANGE argument.
+DETAIL:  A function returning "anyrange" must have at least one "anyrange" argument.