X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 472EC3A3BC1 for ; Fri, 5 Nov 2004 08:23:59 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 01203-09 for ; Fri, 5 Nov 2004 08:23:56 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id A9FDC3A3B9F for ; Fri, 5 Nov 2004 08:23:57 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id iA58NtJ7003651 for ; Fri, 5 Nov 2004 08:23:55 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id iA58JVSL002411 for pgsql-jdbc@postgresql.org; Fri, 5 Nov 2004 08:19:31 GMT From: mbch67@yahoo.com X-Newsgroups: comp.databases.postgresql.interfaces.jdbc Subject: Re: 8.0.0beta4: "copy" and "client_encoding" Date: 5 Nov 2004 00:19:32 -0800 Organization: http://groups.google.com Lines: 22 Message-ID: References: <41893BC8.6000201@opencloud.com> <418A01B2.70104@opencloud.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: groups-abuse@google.com To: pgsql-jdbc@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.6 tagged_above=0.0 required=5.0 tests=FORGED_YAHOO_RCVD, FROM_ENDS_IN_NUMS, NO_REAL_NAME X-Spam-Level: * X-Archive-Number: 200411/60 X-Sequence-Number: 11482 > I suppose that in the absence of backend support for this, we could add > some URL parameter that allows client_encoding to be changed, with > suitably dangerous warnings around using it. Then you can temporarily > flip client_encoding to LATIN1 for the duration of the COPY, and revert > it to UNICODE afterwards. > To me a temporarly fix is not really the solution. Shouldn't there be done some more investigations first, e.g. 1. I set LATIN1 as the database (postgresql.conf) default client encoding. Why does COPY, executed via JDBC not use the right encoding? => To me it seems to be a backend problem. Should this be address in another posting list? 2. Was the decision to disable the "SET CLIENT_ENCODING" command really a good idea? What about if I am running a server using UNICODE to store text, my default client encoding is LATIN1 and I want to import a Korean encoded text file using COPY via JDBC? There is no way to tell COPY what encoding the input file based on. In order to be compliant with PSQL I suggest to reactivate the disabled "SET CLIENT ENCODING" for JDBC.