Re: Determining client_encoding from client locale - Mailing list pgsql-hackers

From Susanne Ebrecht
Subject Re: Determining client_encoding from client locale
Date
Msg-id 4D343D09.6080600@2ndQuadrant.com
Whole thread Raw
In response to Re: Determining client_encoding from client locale  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Determining client_encoding from client locale
List 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



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: texteq/byteaeq: avoid detoast [REVIEW]
Next
From: Robert Haas
Date:
Subject: Re: Replication logging