Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 361E01337B69 for ; Mon, 18 Apr 2011 11:34:24 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 79996-06 for ; Mon, 18 Apr 2011 14:34:06 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from dd2030.kasserver.com (dd2030.kasserver.com [85.13.128.37]) by mail.postgresql.org (Postfix) with ESMTP id DB76F1337B49 for ; Mon, 18 Apr 2011 11:34:05 -0300 (ADT) Received: from [172.26.14.62] (exit.credativ.com [87.139.82.80]) by dd2030.kasserver.com (Postfix) with ESMTPA id 79D54E00AB; Mon, 18 Apr 2011 16:34:05 +0200 (CEST) Date: Mon, 18 Apr 2011 16:34:04 +0200 From: Bernd Helmle To: Tom Lane , Steve Singer cc: PostgreSQL-development Hackers Subject: Re: JDBC connections to 9.1 Message-ID: <4513A768D798800859BAA819@apophis.local> In-Reply-To: <1D1444218CDB28801BEEB27D@apophis.local> References: <4DAC3D55.1080606@ca.afilias.info> <20799.1303134278@sss.pgh.pa.us> <1D1444218CDB28801BEEB27D@apophis.local> X-Mailer: Mulberry/4.0.8 (Mac OS X) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201104/880 X-Sequence-Number: 186082 --On 18. April 2011 16:17:57 +0200 Bernd Helmle wrote: > 16:09:47.942 (1) <=BE ParameterStatus(client_encoding = UTF8) > org.postgresql.util.PSQLException: Protocol error. Session setup failed. > at > org.postgresql.core.v3.ConnectionFactoryImpl.readStartupMessages(ConnectionFa > ctoryImpl.java:498) ConnectionFactoryImpl.readStartupMessages() has this: else if (name.equals("client_encoding")) { if (!value.equals("UNICODE")) throw new PSQLException(GT.tr("Protocol error. Session setup failed."), PSQLState.PROTOCOL_VIOLATION); pgStream.setEncoding(Encoding.getDatabaseEncoding("UNICODE")); } If i am reading it correct, it reads "UTF8" from the backend, while expecting "UNICODE" only. Not sure what change has caused this, though. If i extend the check to include "UTF8", everything seems to work. -- Thanks Bernd