pgsql: Improve the method of localizing column names and other fixed - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Improve the method of localizing column names and other fixed
Date
Msg-id 20071212214147.BC4957540F0@cvs.postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
Improve the method of localizing column names and other fixed strings in
psql's \d commands and other uses of printQuery().  Previously we would pass
these strings through gettext() and then send them to the server as literals
in the SQL query.  But the code was not set up to handle doubling of quotes in
the strings, causing failure if a translation attempted to use the wrong kind
of quote marks, as indeed is now the case for (at least) the French
translation of \dFp.  Another hazard was that gettext() would translate to
whatever encoding was implied by the client's LC_CTYPE setting, which might be
different from the client_encoding setting, which would probably cause the
server to reject the query as mis-encoded.  The new arrangement is to send the
untranslated ASCII strings to the server, and do the translations inside
printQuery() after the query results come back.  Per report from Guillaume
Lelarge and subsequent discussion.

Modified Files:
--------------
    pgsql/src/bin/psql:
        describe.c (r1.162 -> r1.163)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/bin/psql/describe.c?r1=1.162&r2=1.163)
        large_obj.c (r1.48 -> r1.49)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/bin/psql/large_obj.c?r1=1.48&r2=1.49)
        print.c (r1.94 -> r1.95)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/bin/psql/print.c?r1=1.94&r2=1.95)
        print.h (r1.33 -> r1.34)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/bin/psql/print.h?r1=1.33&r2=1.34)
        startup.c (r1.144 -> r1.145)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/bin/psql/startup.c?r1=1.144&r2=1.145)
    pgsql/src/bin/scripts:
        createlang.c (r1.27 -> r1.28)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/bin/scripts/createlang.c?r1=1.27&r2=1.28)
        droplang.c (r1.24 -> r1.25)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/bin/scripts/droplang.c?r1=1.24&r2=1.25)

pgsql-committers by date:

Previous
From: rlucas@pgfoundry.org (User Rlucas)
Date:
Subject: aupg - aupg_src: removed augpgschema designation in front of
Next
From: momjian@postgresql.org (Bruce Momjian)
Date:
Subject: pgsql: Mark items needing updating for beta stamping.