Re: bug in localized \df+ output

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: bug in localized \df+ output
Дата
Msg-id 20080514195145.GG9838@alvh.no-ip.org
обсуждение исходный текст
Ответ на bug in localized \df+ output  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: bug in localized \df+ output  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
Alvaro Herrera wrote:
> I'm seeing this:
> 
> Liste des fonctions
> -[ RECORD 1 ]--------------------+----------------------------------------------------------------------------
> Schéma                          | public
> Nom                              | tg_backlink_a
> Type de données du résultat    | trigger
> Type de données des paramètres | 

After much poking around and talking to Bruce on IM I noticed that this
only shows up if the client is on a multibyte locale (I'm on an UTF8
locale) and the database has been created as SQL_ASCII.

So the environment is bogus: psql is calculating widths for locale C,
but psql is using the other locale.  Witness what happens when I run
psql in a non-UTF8 environment instead:

regression=# select * from baz;trouvé | détail | tròis 
--------+---------+--------f      | ááá  |      3
(1 fila)

(the alignment is correct, but the accented letter show up as UTF8
sequences interpreted as latin1)


And this is what I get on the UTF8 xterm:

regression=# select * from baz;trouv�| détail | tròis 
--------+---------+--------f      | ááá  |      3
(1 ligne)

(the accents are OK but the alignment is messed up).


So, in conclusion, the problem is that the environment is bogus, but I'm
not sure if something needs to be told to psql about that.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: What to do with inline warnings?
Следующее
От: "Marko Kreen"
Дата:
Сообщение: [rfc,patch] PL/Proxy in core