more message fixes

Поиск
Список
Период
Сортировка
Искать
От
Alvaro Herrera
Тема
more message fixes
Дата
в 18:30:05
Msg-id
20190515183005.GA26486@alvherre.pgsql
Список
Дерево обсуждения
more message fixes Alvaro Herrera <alvherre@2ndquadrant.com>
Re: more message fixes Tom Lane <tgl@sss.pgh.pa.us>
Re: more message fixes Alvaro Herrera <alvherre@2ndquadrant.com>
Here's a bunch of message fixes in the postgres.po module.  Please
comment if anything seems amiss.  This is not a final patch, since
regression output has not been adjusted; I only verified that the
backend still compiles cleanly.  Some of the changes are going from this
style of message:
  You need an unconditional ON DELETE DO INSTEAD rule with a RETURNING clause.
to this:
  You need an unconditional %s rule with a RETURNING clause.
where the ON DELETE DO INSTEAD part is inserted at execution time, and
can be things like ON UPDATE DO INSTEAD of ON INSERT DO INSTEAD.  If the
reduced string context causes inappropriate changes for any language, I
suppose we shouldn't make this kind of change, but I hope not.

I'm also changing
  "ucnv_fromUChars failed: %s"
to this:
  "%s failed: %s", "ucnv_fromUChars"
so it essentially reduces the number of translated strings, because we
already have "%s failed: %s" in other parts of the backend.  I think
this is not an issue.  Alternatively, we could just remove that message
from translation altogether, and have it emit the English version
always, by changing it from errmsg() to errmsg_internal().

The bulk of the changes are much less interesting that those.

I'm proposing changes in a lot of files:

 src/backend/commands/copy.c             |  6 +++---
 src/backend/commands/publicationcmds.c  |  2 +-
 src/backend/commands/subscriptioncmds.c | 32 ++++++++++++++++++++------------
 src/backend/commands/tablecmds.c        |  9 +++++----
 src/backend/parser/analyze.c            |  2 +-
 src/backend/parser/parse_oper.c         |  1 +
 src/backend/postmaster/postmaster.c     |  7 ++++---
 src/backend/replication/basebackup.c    | 17 +++++++----------
 src/backend/replication/walsender.c     | 20 ++++++++++----------
 src/backend/rewrite/rewriteHandler.c    | 19 +++++++++++++------
 src/backend/utils/adt/jsonpath.c        |  3 ++-
 src/backend/utils/adt/jsonpath_exec.c   |  2 +-
 src/backend/utils/adt/jsonpath_scan.l   | 10 +++++-----
 src/backend/utils/adt/pg_locale.c       | 10 ++++++----
 src/backend/utils/adt/regexp.c          | 14 ++++++++++----
 15 files changed, 89 insertions(+), 65 deletions(-)

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-hackers по дате отправления
От: Andres Freund
Дата:
Сообщение: Re: New EXPLAIN option: ALL
От: Andres Freund
Дата:
FAQ