Commit ec6e70c7 authored by Peter Eisentraut's avatar Peter Eisentraut

Refactor some error messages for easier translation

parent a363bc6d
......@@ -31,7 +31,7 @@ int default_toast_compression = TOAST_PGLZ_COMPRESSION;
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED), \
errmsg("unsupported LZ4 compression method"), \
errdetail("This functionality requires the server to be built with lz4 support."), \
errhint("You need to rebuild PostgreSQL using --with-lz4.")))
errhint("You need to rebuild PostgreSQL using %s.", "--with-lz4")))
/*
* Compress a varlena using PGLZ.
......
......@@ -2086,7 +2086,7 @@ enforce_generic_type_consistency(const Oid *actual_arg_types,
if (OidIsValid(elem_typeid) && actual_type != elem_typeid)
ereport(ERROR,
(errcode(ERRCODE_DATATYPE_MISMATCH),
errmsg("arguments declared \"anyelement\" are not all alike"),
errmsg("arguments declared \"%s\" are not all alike", "anyelement"),
errdetail("%s versus %s",
format_type_be(elem_typeid),
format_type_be(actual_type))));
......@@ -2106,7 +2106,7 @@ enforce_generic_type_consistency(const Oid *actual_arg_types,
if (OidIsValid(array_typeid) && actual_type != array_typeid)
ereport(ERROR,
(errcode(ERRCODE_DATATYPE_MISMATCH),
errmsg("arguments declared \"anyarray\" are not all alike"),
errmsg("arguments declared \"%s\" are not all alike", "anyarray"),
errdetail("%s versus %s",
format_type_be(array_typeid),
format_type_be(actual_type))));
......@@ -2126,7 +2126,7 @@ enforce_generic_type_consistency(const Oid *actual_arg_types,
if (OidIsValid(range_typeid) && actual_type != range_typeid)
ereport(ERROR,
(errcode(ERRCODE_DATATYPE_MISMATCH),
errmsg("arguments declared \"anyrange\" are not all alike"),
errmsg("arguments declared \"%s\" are not all alike", "anyrange"),
errdetail("%s versus %s",
format_type_be(range_typeid),
format_type_be(actual_type))));
......@@ -2146,7 +2146,7 @@ enforce_generic_type_consistency(const Oid *actual_arg_types,
if (OidIsValid(multirange_typeid) && actual_type != multirange_typeid)
ereport(ERROR,
(errcode(ERRCODE_DATATYPE_MISMATCH),
errmsg("arguments declared \"anymultirange\" are not all alike"),
errmsg("arguments declared \"%s\" are not all alike", "anymultirange"),
errdetail("%s versus %s",
format_type_be(multirange_typeid),
format_type_be(actual_type))));
......@@ -2201,7 +2201,7 @@ enforce_generic_type_consistency(const Oid *actual_arg_types,
if (anycompatible_range_typeid != actual_type)
ereport(ERROR,
(errcode(ERRCODE_DATATYPE_MISMATCH),
errmsg("arguments declared \"anycompatiblerange\" are not all alike"),
errmsg("arguments declared \"%s\" are not all alike", "anycompatiblerange"),
errdetail("%s versus %s",
format_type_be(anycompatible_range_typeid),
format_type_be(actual_type))));
......@@ -2234,7 +2234,7 @@ enforce_generic_type_consistency(const Oid *actual_arg_types,
if (anycompatible_multirange_typeid != actual_type)
ereport(ERROR,
(errcode(ERRCODE_DATATYPE_MISMATCH),
errmsg("arguments declared \"anycompatiblemultirange\" are not all alike"),
errmsg("arguments declared \"%s\" are not all alike", "anycompatiblemultirange"),
errdetail("%s versus %s",
format_type_be(anycompatible_multirange_typeid),
format_type_be(actual_type))));
......
......@@ -1586,7 +1586,7 @@ pg_newlocale_from_collation(Oid collid)
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("ICU is not supported in this build"), \
errhint("You need to rebuild PostgreSQL using --with-icu.")));
errhint("You need to rebuild PostgreSQL using %s.", "--with-icu")));
#endif /* not USE_ICU */
}
......
......@@ -221,7 +221,7 @@ const TableFuncRoutine XmlTableRoutine =
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED), \
errmsg("unsupported XML feature"), \
errdetail("This functionality requires the server to be built with libxml support."), \
errhint("You need to rebuild PostgreSQL using --with-libxml.")))
errhint("You need to rebuild PostgreSQL using %s.", "--with-libxml")))
/* from SQL/XML:2008 section 4.9 */
......
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