X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 17DAC3A4179 for ; Tue, 9 Nov 2004 00:28:33 +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 96660-05 for ; Tue, 9 Nov 2004 00:28:24 +0000 (GMT) Received: from mail63.csoft.net (leary3.csoft.net [63.111.22.74]) by svr1.postgresql.org (Postfix) with SMTP id 683E43A4168 for ; Tue, 9 Nov 2004 00:28:21 +0000 (GMT) Received: (qmail 26134 invoked by uid 1112); 9 Nov 2004 00:28:40 -0000 Date: Mon, 8 Nov 2004 19:28:40 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Barry Lind Cc: Oliver Jowett , Markus Schaber , pgsql-jdbc@postgresql.org, mbch67@yahoo.com, pgsql-hackers@postgresql.org Subject: Re: [JDBC] 8.0.0beta4: "copy" and "client_encoding" In-Reply-To: <03E7D3E231BB7B4A915A6581D4296CC6C083E1@NSNOVPS00411.nacio.xythos.com> Message-ID: References: <03E7D3E231BB7B4A915A6581D4296CC6C083E1@NSNOVPS00411.nacio.xythos.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/323 X-Sequence-Number: 60895 Well, lets ask -hackers... When COPYing data from a file, the file encoding is taken from the client_encoding parameter. The JDBC driver always uses UNICODE as the client_encoding and wants to prevent people from changing it by monitoring ParameterStatus messages and erroring out if it's changed. This presents a problem when you want to COPY to or from a file with a different encoding. It seems reasonable to add an ENCODING specification to the COPY command instead of relying on the somewhat unrelated client_encoding setting. Oliver Jowett also noted that copying from a file with LATIN1 data into a table whose name contained UNICODE characters could not be done. Does this seem like a reasonable thing to do? Kris Jurka On Mon, 8 Nov 2004, Barry Lind wrote: > I am assuming this will get addressed in the backend in 8.1 and that > would be the upgrade path. (I agree if there isn't agreement on the > server side that this is appropriate for the server, then this wouldn't > be the correct parameter). > > --Barry >