Re: JDBC connections to 9.1 - Mailing list pgsql-hackers

From Bernd Helmle
Subject Re: JDBC connections to 9.1
Date
Msg-id 4513A768D798800859BAA819@apophis.local
Whole thread Raw
In response to Re: JDBC connections to 9.1  (Bernd Helmle <mailings@oopsware.de>)
Responses Re: JDBC connections to 9.1  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers

--On 18. April 2011 16:17:57 +0200 Bernd Helmle <mailings@oopsware.de> 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



pgsql-hackers by date:

Previous
From: Devrim GÜNDÜZ
Date:
Subject: Re: JDBC connections to 9.1
Next
From: Tom Lane
Date:
Subject: Re: Open issues for collations