Commit 740ee42d authored by Peter Eisentraut's avatar Peter Eisentraut

Make some messages more consistent in style

parent a0bfb7b3
...@@ -246,7 +246,7 @@ ProcedureCreate(const char *procedureName, ...@@ -246,7 +246,7 @@ ProcedureCreate(const char *procedureName,
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION),
errmsg("cannot determine result data type"), 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) if ((returnType == INTERNALOID || internalOutParam) && !internalInParam)
ereport(ERROR, ereport(ERROR,
......
...@@ -311,7 +311,7 @@ lazy_vacuum_rel(Relation onerel, VacuumStmt *vacstmt, ...@@ -311,7 +311,7 @@ lazy_vacuum_rel(Relation onerel, VacuumStmt *vacstmt,
"pages: %d removed, %d remain\n" "pages: %d removed, %d remain\n"
"tuples: %.0f removed, %.0f remain\n" "tuples: %.0f removed, %.0f remain\n"
"buffer usage: %d hits, %d misses, %d dirtied\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", "system usage: %s",
get_database_name(MyDatabaseId), get_database_name(MyDatabaseId),
get_namespace_name(RelationGetNamespace(onerel)), get_namespace_name(RelationGetNamespace(onerel)),
......
...@@ -1694,7 +1694,7 @@ enforce_generic_type_consistency(Oid *actual_arg_types, ...@@ -1694,7 +1694,7 @@ enforce_generic_type_consistency(Oid *actual_arg_types,
if (!OidIsValid(range_typelem)) if (!OidIsValid(range_typelem))
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_DATATYPE_MISMATCH), (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)))); format_type_be(range_typeid))));
} }
...@@ -1915,7 +1915,7 @@ resolve_generic_type(Oid declared_type, ...@@ -1915,7 +1915,7 @@ resolve_generic_type(Oid declared_type,
if (!OidIsValid(range_typelem)) if (!OidIsValid(range_typelem))
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_DATATYPE_MISMATCH), (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)))); format_type_be(context_base_type))));
return range_typelem; return range_typelem;
} }
......
...@@ -1180,7 +1180,7 @@ drop function anyarray_anyrange_func(anyarray, anyrange); ...@@ -1180,7 +1180,7 @@ drop function anyarray_anyrange_func(anyarray, anyrange);
create function bogus_func(anyelement) create function bogus_func(anyelement)
returns anyrange as 'select int4range(1,10)' language sql; returns anyrange as 'select int4range(1,10)' language sql;
ERROR: cannot determine result data type 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 -- should fail
create function bogus_func(int) create function bogus_func(int)
returns anyrange as 'select int4range(1,10)' language sql; returns anyrange as 'select int4range(1,10)' language sql;
...@@ -1287,14 +1287,14 @@ select * from table_succeed(123, int4range(1,11)); ...@@ -1287,14 +1287,14 @@ select * from table_succeed(123, int4range(1,11));
create function outparam_fail(i anyelement, out r anyrange, out t text) create function outparam_fail(i anyelement, out r anyrange, out t text)
as $$ select '[1,10]', 'foo' $$ language sql; as $$ select '[1,10]', 'foo' $$ language sql;
ERROR: cannot determine result data type 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 --should fail
create function inoutparam_fail(inout i anyelement, out r anyrange) create function inoutparam_fail(inout i anyelement, out r anyrange)
as $$ select $1, '[1,10]' $$ language sql; as $$ select $1, '[1,10]' $$ language sql;
ERROR: cannot determine result data type 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 --should fail
create function table_fail(i anyelement) returns table(i anyelement, r anyrange) create function table_fail(i anyelement) returns table(i anyelement, r anyrange)
as $$ select $1, '[1,10]' $$ language sql; as $$ select $1, '[1,10]' $$ language sql;
ERROR: cannot determine result data type 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.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment