pgsql: Fix translatability markings in psql, and add defenses against f - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Fix translatability markings in psql, and add defenses against f
Date
Msg-id E1VzYPf-0002d7-Ro@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix translatability markings in psql, and add defenses against future bugs.

Several previous commits have added columns to various \d queries without
updating their translate_columns[] arrays, leading to potentially incorrect
translations in NLS-enabled builds.  Offenders include commit 893686762
(added prosecdef to \df+), c9ac00e6e (added description to \dc+) and
3b17efdfd (added description to \dC+).  Fix those cases back to 9.3 or
9.2 as appropriate.

Since this is evidently more easily missed than one would like, in HEAD
also add an Assert that the supplied array is long enough.  This requires
an API change for printQuery(), so it seems inappropriate for back
branches, but presumably all future changes will be tested in HEAD anyway.

In HEAD and 9.3, also clean up a whole lot of sloppiness in the emitted
SQL for \dy (event triggers): lack of translatability due to failing to
pass words-to-be-translated through gettext_noop(), inadequate schema
qualification, and sloppy formatting resulting in unnecessarily ugly
-E output.

Peter Eisentraut and Tom Lane, per bug #8702 from Sergey Burladyan

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/92459e7a7f87f91fc3012bea9eef870cf464d91f

Modified Files
--------------
src/bin/psql/describe.c      |   44 ++++++++++++++++++++++++++++--------------
src/bin/psql/print.c         |    4 ++++
src/bin/psql/print.h         |    1 +
src/bin/scripts/createlang.c |    2 ++
src/bin/scripts/droplang.c   |    2 ++
5 files changed, 39 insertions(+), 14 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Fix translatability markings in psql, and add defenses against f
Next
From: Tom Lane
Date:
Subject: pgsql: Cache catalog lookup data across groups in ordered-set aggregate