Re: Determining client_encoding from client locale
Susanne Ebrecht <susanne@2ndquadrant.com>
From: Susanne Ebrecht <susanne@2ndQuadrant.com>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: Jaime Casanova <jcasanov@systemguards.com.ec>, Magnus Hagander <magnus@hagander.net>, Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>, pgsql-hackers@postgresql.org, Tom Lane <tgl@sss.pgh.pa.us>, Bruce Momjian <bruce@momjian.us>, Itagaki Takahiro <itagaki.takahiro@oss.ntt.co.jp>
Date: 2011-01-17T12:58:49Z
Lists: pgsql-hackers
On 14.01.2011 20:12, Peter Eisentraut wrote: > I have adjusted your old patch for the current tree, and it seems to > work. I think it was just forgotten last time because the move to > PQconnectdbParams had to happen first. But I'll throw it back into the > ring now. Hello, maybe i missed pre-discussion but ... I miss considering auto-detect of file encoding. A simple example: $ psql -f dump.sql db What happens when dump.sql is written by using another encoding? I just would expect that when client encoding is detected by automatism that it also will be detected when I use files. My own experience from "the others" is that users more often forget to think about encoding when they deal with files as when they type in the client. Anyway, the code itself seems ok. I just would recommend to document that the client encoding should be checked from the user anyway. Just to make sure that it is not our fault, when there is a libc bug. Just my 2ct, Susanne -- Susanne Ebrecht - 2ndQuadrant PostgreSQL Development, 24x7 Support, Training and Services www.2ndQuadrant.com