From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: Passing server_encoding to the client is not future-proof |
Date: | 2003-08-04 20:12:17 |
Message-ID: | 9689.1060027937@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Peter Eisentraut writes:
> Tom Lane wrote:
>> Clients could probably still make use of server_encoding, though I'm
>> unclear on what they'd use it for now, let alone then. ISTM
>> client_encoding is the only setting the client need deal with directly.
> Then why did we add a GUC variable "server_encoding" at all?
I've just remembered one issue that bears on this subject. Back around
mid-May we discussed whether "binary" transmission of textual datatypes
ought to perform client<->server encoding conversion or not. If it does
not, then obviously it would be useful for clients to know what encoding
they are getting.
The current code does perform conversion in these cases. I think that
when the May thread died off, we were leaning to changing it, but I've
not made it happen yet.
Of course, if we someday support multiple encodings on the server side,
life gets complex --- how would a client know which encoding it's
getting in a binary transmission? (Perhaps it would have to be part of
the data.) It doesn't seem like that's a reason to stay with
always-convert, though. One of the reasons for not doing conversion in
binary mode is to have an escape hatch for unconvertible characters,
eg for dump purposes. That need will get worse with multiple server
encodings.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | ivan | 2003-08-04 20:28:20 | Re: problem with cache |
Previous Message | Joe Conway | 2003-08-04 19:46:43 | Re: [HACKERS] statement level trigger causes pltcl, plpython |