/* complain even if that DB has disappeared */
if (oldest_datname)
ereport(WARNING,
- (errmsg("database \"%s\" must be vacuumed before %u more MultiXactIds are used",
+ (errmsg_plural("database \"%s\" must be vacuumed before %u more MultiXactId is used",
+ "database \"%s\" must be vacuumed before %u more MultiXactIds are used",
+ multiWrapLimit - result,
oldest_datname,
multiWrapLimit - result),
errhint("Execute a database-wide VACUUM in that database.\n"
"You might also need to commit or roll back old prepared transactions.")));
else
ereport(WARNING,
- (errmsg("database with OID %u must be vacuumed before %u more MultiXactIds are used",
+ (errmsg_plural("database with OID %u must be vacuumed before %u more MultiXactId is used",
+ "database with OID %u must be vacuumed before %u more MultiXactIds are used",
+ multiWrapLimit - result,
oldest_datoid,
multiWrapLimit - result),
errhint("Execute a database-wide VACUUM in that database.\n"
if (oldest_datname)
ereport(WARNING,
- (errmsg("database \"%s\" must be vacuumed before %u more MultiXactIds are used",
+ (errmsg_plural("database \"%s\" must be vacuumed before %u more MultiXactId is used",
+ "database \"%s\" must be vacuumed before %u more MultiXactIds are used",
+ multiWrapLimit - curMulti,
oldest_datname,
multiWrapLimit - curMulti),
errhint("To avoid a database shutdown, execute a database-wide VACUUM in that database.\n"
"You might also need to commit or roll back old prepared transactions.")));
else
ereport(WARNING,
- (errmsg("database with OID %u must be vacuumed before %u more MultiXactIds are used",
+ (errmsg_plural("database with OID %u must be vacuumed before %u more MultiXactId is used",
+ "database with OID %u must be vacuumed before %u more MultiXactIds are used",
+ multiWrapLimit - curMulti,
oldest_datoid,
multiWrapLimit - curMulti),
errhint("To avoid a database shutdown, execute a database-wide VACUUM in that database.\n"
ereport(ERROR,
(errcode(ERRCODE_OUT_OF_MEMORY),
errmsg("out of memory"),
- errdetail("Failed while allocating an XLog reading processor")));
+ errdetail("Failed while allocating an XLog reading processor.")));
xlogreader->system_identifier = ControlFile->system_identifier;
if (read_backup_label(&checkPointLoc, &backupEndRequired,
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("invalid input syntax for type json"),
- errdetail("high order surrogate must not follow a high order surrogate."),
+ errdetail("Unicode high surrogate must not follow a high surrogate."),
report_json_context(lex)));
hi_surrogate = (ch & 0x3ff) << 10;
continue;
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("invalid input syntax for type json"),
- errdetail("low order surrogate must follow a high order surrogate."),
+ errdetail("Unicode low surrogate must follow a high surrogate."),
report_json_context(lex)));
ch = 0x10000 + hi_surrogate + (ch & 0x3ff);
hi_surrogate = -1;
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("invalid input syntax for type json"),
- errdetail("low order surrogate must follow a high order surrogate."),
+ errdetail("Unicode low surrogate must follow a high surrogate."),
report_json_context(lex)));
/*
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("invalid input syntax for type json"),
- errdetail("Unicode escape for code points higher than U+007F not permitted in non-UTF8 encoding"),
+ errdetail("Unicode escape values cannot be used for code point values above 007F when the server encoding is not UTF8."),
report_json_context(lex)));
}
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("invalid input syntax for type json"),
- errdetail("low order surrogate must follow a high order surrogate."),
+ errdetail("Unicode low surrogate must follow a high surrogate."),
report_json_context(lex)));
switch (*s)
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("invalid input syntax for type json"),
- errdetail("low order surrogate must follow a high order surrogate."),
+ errdetail("Unicode low surrogate must follow a high surrogate."),
report_json_context(lex)));
appendStringInfoChar(lex->strval, *s);
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("invalid input syntax for type json"),
- errdetail("low order surrogate must follow a high order surrogate."),
+ errdetail("Unicode low surrogate must follow a high surrogate."),
report_json_context(lex)));
/* Hooray, we found the end of the string! */
if (!type_is_rowtype(argtype))
ereport(ERROR,
(errcode(ERRCODE_DATATYPE_MISMATCH),
- errmsg("first argument must be a rowtype")));
+ errmsg("first argument of json_populate_record must be a row type")));
if (PG_ARGISNULL(0))
{
if (!type_is_rowtype(argtype))
ereport(ERROR,
(errcode(ERRCODE_DATATYPE_MISMATCH),
- errmsg("first argument must be a rowtype")));
+ errmsg("first argument of json_populate_recordset must be a row type")));
rsi = (ReturnSetInfo *) fcinfo->resultinfo;
select json '{ "a": "\ud83d\ud83d" }' -> 'a'; -- 2 high surrogates in a row
ERROR: invalid input syntax for type json
-DETAIL: high order surrogate must not follow a high order surrogate.
+DETAIL: Unicode high surrogate must not follow a high surrogate.
CONTEXT: JSON data, line 1: { "a":...
select json '{ "a": "\ude04\ud83d" }' -> 'a'; -- surrogates in wrong order
ERROR: invalid input syntax for type json
-DETAIL: low order surrogate must follow a high order surrogate.
+DETAIL: Unicode low surrogate must follow a high surrogate.
CONTEXT: JSON data, line 1: { "a":...
select json '{ "a": "\ud83dX" }' -> 'a'; -- orphan high surrogate
ERROR: invalid input syntax for type json
-DETAIL: low order surrogate must follow a high order surrogate.
+DETAIL: Unicode low surrogate must follow a high surrogate.
CONTEXT: JSON data, line 1: { "a":...
select json '{ "a": "\ude04X" }' -> 'a'; -- orphan low surrogate
ERROR: invalid input syntax for type json
-DETAIL: low order surrogate must follow a high order surrogate.
+DETAIL: Unicode low surrogate must follow a high surrogate.
CONTEXT: JSON data, line 1: { "a":...
--handling of simple unicode escapes
select json '{ "a": "the Copyright \u00a9 sign" }' ->> 'a' as correct_in_utf8;
-- handling of unicode surrogate pairs
select json '{ "a": "\ud83d\ude04\ud83d\udc36" }' -> 'a' as correct_in_utf8;
ERROR: invalid input syntax for type json
-DETAIL: Unicode escape for code points higher than U+007F not permitted in non-UTF8 encoding
+DETAIL: Unicode escape values cannot be used for code point values above 007F when the server encoding is not UTF8.
CONTEXT: JSON data, line 1: { "a":...
select json '{ "a": "\ud83d\ud83d" }' -> 'a'; -- 2 high surrogates in a row
ERROR: invalid input syntax for type json
-DETAIL: high order surrogate must not follow a high order surrogate.
+DETAIL: Unicode high surrogate must not follow a high surrogate.
CONTEXT: JSON data, line 1: { "a":...
select json '{ "a": "\ude04\ud83d" }' -> 'a'; -- surrogates in wrong order
ERROR: invalid input syntax for type json
-DETAIL: low order surrogate must follow a high order surrogate.
+DETAIL: Unicode low surrogate must follow a high surrogate.
CONTEXT: JSON data, line 1: { "a":...
select json '{ "a": "\ud83dX" }' -> 'a'; -- orphan high surrogate
ERROR: invalid input syntax for type json
-DETAIL: low order surrogate must follow a high order surrogate.
+DETAIL: Unicode low surrogate must follow a high surrogate.
CONTEXT: JSON data, line 1: { "a":...
select json '{ "a": "\ude04X" }' -> 'a'; -- orphan low surrogate
ERROR: invalid input syntax for type json
-DETAIL: low order surrogate must follow a high order surrogate.
+DETAIL: Unicode low surrogate must follow a high surrogate.
CONTEXT: JSON data, line 1: { "a":...
--handling of simple unicode escapes
select json '{ "a": "the Copyright \u00a9 sign" }' ->> 'a' as correct_in_utf8;
ERROR: invalid input syntax for type json
-DETAIL: Unicode escape for code points higher than U+007F not permitted in non-UTF8 encoding
+DETAIL: Unicode escape values cannot be used for code point values above 007F when the server encoding is not UTF8.
CONTEXT: JSON data, line 1: { "a":...
select json '{ "a": "dollar \u0024 character" }' ->> 'a' as correct_everywhere;
correct_everywhere