diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2017-08-23 13:56:59 -0400 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2017-08-23 13:56:59 -0400 |
commit | 237a0b87b1dc90f8789aa5441a2a11e67f46c96e (patch) | |
tree | 370cee8929088b6d57d54e41315841a3e393ebf6 /src/backend/parser/parse_oper.c | |
parent | 85f4d6393da2ed2ad3ec4912a60a918348784c2b (diff) | |
download | postgresql-237a0b87b1dc90f8789aa5441a2a11e67f46c96e.tar.gz postgresql-237a0b87b1dc90f8789aa5441a2a11e67f46c96e.zip |
Improve plural handling in error message
This does not use the normal plural handling, because no numbers appear
in the actual message.
Diffstat (limited to 'src/backend/parser/parse_oper.c')
-rw-r--r-- | src/backend/parser/parse_oper.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/parser/parse_oper.c b/src/backend/parser/parse_oper.c index e9bf50243f4..d7971cc3d9f 100644 --- a/src/backend/parser/parse_oper.c +++ b/src/backend/parser/parse_oper.c @@ -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))); } |