Re: JDBC connections to 9.1

From: Bernd Helmle <mailings(at)oopsware(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Steve Singer <ssinger(at)ca(dot)afilias(dot)info>
Cc: PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: JDBC connections to 9.1
Date: 2011-04-18 14:34:04
Message-ID: 4513A768D798800859BAA819@apophis.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-jdbc

--On 18. April 2011 16:17:57 +0200 Bernd Helmle <mailings(at)oopsware(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-04-18 14:41:07 Re: Open issues for collations
Previous Message Devrim GÜNDÜZ 2011-04-18 14:29:33 Re: JDBC connections to 9.1

Browse pgsql-jdbc by date

  From Date Subject
Next Message Tom Lane 2011-04-18 14:57:07 Re: JDBC connections to 9.1
Previous Message Devrim GÜNDÜZ 2011-04-18 14:29:33 Re: JDBC connections to 9.1