1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-08 00:47:37 +03:00

Improve plural handling in error message

This does not use the normal plural handling, because no numbers appear
in the actual message.
This commit is contained in:
Peter Eisentraut
2017-08-23 13:56:59 -04:00
parent 85f4d6393d
commit 237a0b87b1
8 changed files with 11 additions and 8 deletions

View File

@@ -723,7 +723,10 @@ op_error(ParseState *pstate, List *op, char oprkind,
(errcode(ERRCODE_UNDEFINED_FUNCTION),
errmsg("operator does not exist: %s",
op_signature_string(op, oprkind, arg1, arg2)),
errhint("No operator matches the given name and argument type(s). "
(!arg1 || !arg2) ?
errhint("No operator matches the given name and argument type. "
"You might need to add an explicit type cast.") :
errhint("No operator matches the given name and argument types. "
"You might need to add explicit type casts."),
parser_errposition(pstate, location)));
}