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

pgsql: Fix indentation of \d footers for non-ASCII cases.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix indentation of \d footers for non-ASCII cases.
Date: 2012-03-08 00:26:07
Message-ID: E1S5RBH-0007p2-BP@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Fix indentation of \d footers for non-ASCII cases.

Multi-line "Inherits:" and "Child tables:" footers were misindented when
those strings' translations involved multibyte characters, because we were
using strlen() instead of an appropriate display width measurement.

In passing, avoid doing gettext() more than once per loop in these places.

While at it, fix pg_wcswidth(), which has been entirely broken since about
8.2, but fortunately has been unused for the same length of time.

Report and patch by Sergey Burladyan (bug #6480)

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/1ed7f0e6b90a9b693895105a90d8b5b0eefbcd56

Modified Files
--------------
src/bin/psql/describe.c |   32 +++++++++++++++++++-------------
src/bin/psql/mbprint.c  |   16 +++++++++-------
src/bin/psql/mbprint.h  |    2 +-
3 files changed, 29 insertions(+), 21 deletions(-)

pgsql-committers by date

Next:From: Tom LaneDate: 2012-03-08 04:00:52
Subject: pgsql: Improve estimation of IN/NOT IN by assuming array elements ared
Previous:From: Tom LaneDate: 2012-03-07 23:21:10
Subject: pgsql: Add GetForeignColumnOptions() to foreign.c,and add some documen

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