From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
Subject: | Re: Determining client_encoding from client locale |
Date: | 2009-06-18 21:36:50 |
Message-ID: | 200906182136.n5ILaoH16812@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> writes:
> > Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> >> On Wednesday 17 June 2009 14:29:26 Heikki Linnakangas wrote:
> >>> We currently require that you set client_encoding correctly, or you get
> >>> garbage in psql and any other tool using libpq. How about setting
> >>> client_encoding automatically to match the client's locale? We have
> >>> pg_get_encoding_from_locale() function that we can use to extract the
> >>> encoding from LC_CTYPE. We could call that in libpq.
>
> > +1 for psql, but -1 for libpq.
>
> What would make sense to me is for libpq to provide the *code* for this,
> but then leave it up to the client application whether to actually call
> it; if not the behavior stays the same as before. Aside from
> Itagaki-san's objections, that eliminates backwards-compatibility issues
> for other applications.
Added to TODO:
Add code to detect client encoding and locale from the operating system
environment
* http://archives.postgresql.org/pgsql-hackers/2009-06/msg01040.php
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-06-18 21:51:11 | Re: Determining client_encoding from client locale |
Previous Message | Kevin Grittner | 2009-06-18 21:20:08 | Re: 8.4 open item: copy performance regression? |