pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bernd Helmle <mailings@oopsware.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Steve Singer <ssinger@ca.afilias.info>
Cc: PostgreSQL-development Hackers <pgsql-hackers@postgresql.org>
Subject: Re: JDBC connections to 9.1
Date: Mon, 18 Apr 2011 16:34:04 +0200
Message-ID: <4513A768D798800859BAA819@apophis.local> (raw)
In-Reply-To: <1D1444218CDB28801BEEB27D@apophis.local>
References: <4DAC3D55.1080606@ca.afilias.info>
	<20799.1303134278@sss.pgh.pa.us>
	<1D1444218CDB28801BEEB27D@apophis.local>



--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




view thread (23+ messages)  latest in thread

Message-ID: <4513A768D798800859BAA819@apophis.local>
Permalink:  ../4513A768D798800859BAA819@apophis.local/
Also on:    postgresql.org/message-id/4513A768D798800859BAA819@apophis.local

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: mailings@oopsware.de, tgl@sss.pgh.pa.us, ssinger@ca.afilias.info, pgsql-hackers@postgresql.org
  Subject: Re: JDBC connections to 9.1
  In-Reply-To: <4513A768D798800859BAA819@apophis.local>
  References: <4DAC3D55.1080606@ca.afilias.info> <20799.1303134278@sss.pgh.pa.us> <1D1444218CDB28801BEEB27D@apophis.local> <4513A768D798800859BAA819@apophis.local>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox