1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-13 07:41:39 +03:00

Improve internationalization of messages involving type names

Change the slightly different variations of the message
  function FOO must return type BAR
to a single wording, removing the variability in type name so that they
all create a single translation entry; since the type name is not to be
translated, there's no point in it being part of the message anyway.

Also, change them all to use the same quoting convention, namely that
the function name is not to be quoted but the type name is.  (I'm not
quite sure why this is so, but it's the clear majority.)

Some similar messages such as "encoding conversion function FOO must ..."
are also changed.
This commit is contained in:
Alvaro Herrera
2016-03-28 14:12:00 -03:00
parent 559e7a0a6d
commit 59a2111b23
8 changed files with 37 additions and 36 deletions

View File

@ -237,8 +237,8 @@ CreateEventTrigger(CreateEventTrigStmt *stmt)
if (funcrettype != EVTTRIGGEROID)
ereport(ERROR,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("function \"%s\" must return type \"event_trigger\"",
NameListToString(stmt->funcname))));
errmsg("function %s must return type \"%s\"",
NameListToString(stmt->funcname), "event_trigger")));
/* Insert catalog entries. */
return insert_event_trigger_tuple(stmt->trigname, stmt->eventname,