Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 637571337BF7 for ; Thu, 31 Mar 2011 00:10:54 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 32201-02-2 for ; Thu, 31 Mar 2011 03:10:42 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail63.csoft.net (mail63.csoft.net [205.205.214.4]) by mail.postgresql.org (Postfix) with ESMTP id 945641337C38 for ; Thu, 31 Mar 2011 00:07:28 -0300 (ADT) Received: from leary.csoft.net (leary.csoft.net [205.205.214.5]) by mail63.csoft.net (Postfix) with ESMTP id 08D1A28434; Wed, 30 Mar 2011 23:07:28 -0400 (EDT) Received: by leary.csoft.net (Postfix, from userid 1112) id BC2E4A3E4; Wed, 30 Mar 2011 23:07:27 -0400 (EDT) Date: Wed, 30 Mar 2011 23:07:27 -0400 (EDT) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Kevin Grittner cc: Donald Fraser , "[JDBC]" Subject: Re: Invalid PSQLState used in connection classes In-Reply-To: Message-ID: References: <4D760999020000250003B603@gw.wicourts.gov> User-Agent: Alpine 2.00 (BSO 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201103/141 X-Sequence-Number: 21696 On Sat, 19 Mar 2011, Kris Jurka wrote: > > On Tue, 8 Mar 2011, Kevin Grittner wrote: > >> "Donald Fraser" 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