pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kris Jurka <books@ejurka.com>
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: Donald Fraser <postgres@kiwi-fraser.net>
Cc: [JDBC] <pgsql-jdbc@postgresql.org>
Subject: Re: Invalid PSQLState used in connection classes
Date: Wed, 30 Mar 2011 23:07:27 -0400 (EDT)
Message-ID: <alpine.BSO.2.00.1103302307080.364@leary.csoft.net> (raw)
In-Reply-To: <alpine.BSO.2.00.1103191936050.28447@leary.csoft.net>
References: <CD183140E21E4179B9F1F5DD77EB4E2F@DEVELOP1>
	<4D760999020000250003B603@gw.wicourts.gov>
	<alpine.BSO.2.00.1103191936050.28447@leary.csoft.net>



On Sat, 19 Mar 2011, Kris Jurka wrote:
>
> On Tue, 8 Mar 2011, Kevin Grittner wrote:
>
>> "Donald Fraser" <postgres@kiwi-fraser.net> wrote:
>> 
>>> However if I have a broken network between my client and the
>>> server, such that there is no route to the server, I can get a
>>> ConnectException and I have not established, in any way, a
>>> connection to the PostgreSQL server.
>> 
>> 08001 - SQLCLIENT UNABLE TO ESTABLISH SQLCONNECTION
>> 
>> Sounds better for that sort of failure.
>> 
>
> Sounds reasonable to me.  Looking at the error codes used during startup, I 
> think we should also make some other changes at the same time.
>
> CONNECTION_UNABLE_TO_CONNECT -> PROTOCOL_VIOLATION
> CONNECTION_FAILURE -> PROTOCOL_VIOLATION
> when the driver receives an unknown message.
>
> CONNECTION_FAILURE -> CONNECTION_REJECTED
> when the server doesn't support SSL, but we need a SSL connection.  I think 
> CONNECTION_FAILURE should only be used when something has gone wrong after a 
> connection has been established.
>
> Patch attached.
>

Applied to CVS for 8.2+.

Kris Jurka




view thread (4+ messages)

Message-ID: <alpine.BSO.2.00.1103302307080.364@leary.csoft.net>
Permalink:  ../alpine.BSO.2.00.1103302307080.364@leary.csoft.net/
Also on:    postgresql.org/message-id/alpine.BSO.2.00.1103302307080.364@leary.csoft.net

 · 

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: books@ejurka.com, Kevin.Grittner@wicourts.gov, postgres@kiwi-fraser.net
  Subject: Re: Invalid PSQLState used in connection classes
  In-Reply-To: <alpine.BSO.2.00.1103302307080.364@leary.csoft.net>
  References: <CD183140E21E4179B9F1F5DD77EB4E2F@DEVELOP1> <4D760999020000250003B603@gw.wicourts.gov> <alpine.BSO.2.00.1103191936050.28447@leary.csoft.net> <alpine.BSO.2.00.1103302307080.364@leary.csoft.net>

* 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