Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfa28f9c

Browse files
committed
Fix translatability markings in psql, and add defenses against future bugs.
Several previous commits have added columns to various \d queries withoutupdating their translate_columns[] arrays, leading to potentially incorrecttranslations in NLS-enabled builds. Offenders include commit8936867(added prosecdef to \df+),c9ac00e (added description to \dc+) and3b17efd (added description to \dC+). Fix those cases back to 9.3 or9.2 as appropriate.Since this is evidently more easily missed than one would like, in HEADalso add an Assert that the supplied array is long enough. This requiresan API change for printQuery(), so it seems inappropriate for backbranches, 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 emittedSQL for \dy (event triggers): lack of translatability due to failing topass words-to-be-translated through gettext_noop(), inadequate schemaqualification, and sloppy formatting resulting in unnecessarily ugly-E output.Peter Eisentraut and Tom Lane, per bug #8702 from Sergey Burladyan
1 parent119a598 commitfa28f9c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎src/bin/psql/describe.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2895,7 +2895,8 @@ listConversions(const char *pattern, bool verbose, bool showSystem)
28952895
PQExpBufferDatabuf;
28962896
PGresult*res;
28972897
printQueryOptmyopt=pset.popt;
2898-
staticconstbooltranslate_columns[]= {false, false, false, false, true};
2898+
staticconstbooltranslate_columns[]=
2899+
{false, false, false, false, true, false};
28992900

29002901
initPQExpBuffer(&buf);
29012902

@@ -2969,7 +2970,7 @@ listCasts(const char *pattern, bool verbose)
29692970
PQExpBufferDatabuf;
29702971
PGresult*res;
29712972
printQueryOptmyopt=pset.popt;
2972-
staticconstbooltranslate_columns[]= {false, false, false, true};
2973+
staticconstbooltranslate_columns[]= {false, false, false, true, false};
29732974

29742975
initPQExpBuffer(&buf);
29752976

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp