Skip site navigation (1) Skip section navigation (2)

pgsql: Improve the method of localizing column names and other fixed

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Improve the method of localizing column names and other fixed
Date: 2007-12-12 21:41:47
Message-ID: 20071212214147.BC4957540F0@cvs.postgresql.org (view raw or flat)
Thread:
Lists: 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

Next:From: Bruce MomjianDate: 2007-12-13 02:02:20
Subject: pgsql: Mark items needing updating for beta stamping.
Previous:From: User RlucasDate: 2007-12-12 21:30:48
Subject: aupg - aupg_src: one more schema change on write-only generated trigger

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group