pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: itoshun001@efeel.to <itoshun001@efeel.to>
To: Jorge Solórzano <jorsol@gmail.com>
Cc: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Subject: Re: old JDBC driver (8.1-JDBC3) can connect to postgresql 9.x ?
Date: Tue, 17 Jan 2017 11:39:33 +0900 (JST)
Message-ID: <973148.15452.qm@web32005.mail.ssk.yahoo.co.jp> (raw)
In-Reply-To: <CA+cVU8Mfphd7P=7E9ZNpLPHk4EaN05VNLRmSsfMfAetgYvYQxg@mail.gmail.com>
References: <887714.44014.qm@web32005.mail.ssk.yahoo.co.jp>
	<CA+cVU8N3_LFyHbs_5DLx-ys-oE+M1Dm-9cWJ6LfNuMfcbOq0Bw@mail.gmail.com>
	<902560.56013.qm@web32001.mail.ssk.yahoo.co.jp>
	<CA+cVU8PYLCgZ6mnXsbOn8r-uJ0QvRo7kqids0MnwUW77d+qj+A@mail.gmail.com>
	<235703.87762.qm@web32001.mail.ssk.yahoo.co.jp>
	<CA+cVU8Mfphd7P=7E9ZNpLPHk4EaN05VNLRmSsfMfAetgYvYQxg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>

Hi Jorge and John

Thank you so much for your kind explanations in spite of questions about obsoleted versions of JVM and not supported versions of JDBC driver 

Now I have understood risks to use old version of JDBC driver such as a schema catalog change.
Then we will try not to use old version of JDBC to connect to postgresql 9.x.

Thanks much and best regards,
itoshun
----- Original Message -----
>From: Jorge Solórzano <jorsol@gmail.com>
>To: "itoshun001@efeel.to" <itoshun001@efeel.to> 
>Cc: "pgsql-jdbc@postgresql.org" <pgsql-jdbc@postgresql.org>
>Date: 2017/1/17, Tue 11:02
>Subject: Re: [JDBC] old JDBC driver (8.1-JDBC3) can connect to postgresql 9.x ?
> 
>
>
>
>On Mon, Jan 16, 2017 at 6:05 PM, itoshun001@efeel.to <itoshun001@efeel.to> wrote:
>
>Hi Jorge
>>
>>Thank you for your accurate answers and kind understanding for our situation.
>>Now I understand below and these info is very useful for our team !
>>
>>  - the old driver(8.1-404 JDBC3) technically can connect to postgresql 9.3 but some new features should not be available, and we won't get the bugfixes of later version.
>>
>
>
>​Yes technically, but as John points out ​you could hit a schema catalog change so while it *might* work, there is a chance to hit a problem with pg_catalog updates, the pg_catalog is an internal postgresql table that contains many info consumed by the pgjdbc driver and newer versions of the driver can handle all these variations, so for instance the pgjdbc driver 9.3 Build 1103 can connect without problems to older postgresql versions like the one you are using (8.3) and it can connect to newer postgresql versions like 9.3.
>
>For many years the pgjdbc driver followed the versions of the server to declare some kind of compatibility, basically it means that the version you are using (8.1-404 JDBC3) was essentially for postgresql 8.1 and older, but you are using it for postgresql 8.3 and it works (for you). From the version 9.4.x of the driver that is no longer the case, and the current version 9.4.1212 works on PostgreSQL 9.6 too.
>
> 
>
>>  - the driver should be highly compatible with earlier versions, and if our web app is using standard jdbc, then it should be practically transparent the change (we don't even need to recompile).
>>
>
>
>Yes, it should work for postgresql 8.3 and postgresql 9.3 (and everything between) that means that you should be using (based on the Java 5 version) the PgJDBC 9.3 Build 1103 and not the 8.1-404, but as I said before, always test for potential regressions.
>
> 
>
>>One more question which might be last question....
>>
>>  (Q) My understanding below is correct ??
>>
>>      Versions of jdbc driver that supported Java 5 can't connect to postgresql 9.4 or later 
>>      because 
>>       - the versions of jdbc driver don't support JDBC 4, 41 and 42
>>       - the versions of postreqsql don't support JDBC3
>>
>
>
>​​Let me be cristal clear​, it *might* work ​but again, you might hit a problem with pg_catalog updates and others compatibility issues, so is NOT recomeded to use an older driver version to connect to a newer postgresql version, you should always try to use the latest driver. For example I have a web app that is still on PostgreSQL 9.1 but it's using the latest driver version 9.4.1212. What I mean is that is better to have a new jdbc driver connecting to an older postgresql instance than the opposite.
>
>
>To clarify your points, PostgreSQL knows nothing about Java or JDBC, the PgJDBC driver is a pure Java driver that implements the native protocol of PostgreSQL, so PgJDBC "talks" in the PostgreSQL native language (the binary or text protocol that postgres understand). So when a new version of PostgreSQL comes out, the driver has to "understand" the new or changed stuff so an older version of the driver do not recognize the changed stuff and there might hit a compatibility issue.
>
>
>And as John said, Java 5 is obsolete, my recomendation is to try upgrading the Java version, at least to Java 6, Java is for the most part backward compatible, so you can use a new Java Runtime for a Java 5 compiled app.
>
>
>Then try to update the PgJDBC driver to the latest version, and finally try to upgrade the PostgreSQL server to a supported version.
>
>
>As always, test, test and do more test for any potential problem.
>
> 
>
>>Best regards,
>>itoshun
>>
>
>


-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



view thread (9+ messages)  latest in thread

Message-ID: <973148.15452.qm@web32005.mail.ssk.yahoo.co.jp>
Permalink:  ../973148.15452.qm@web32005.mail.ssk.yahoo.co.jp/
Also on:    postgresql.org/message-id/973148.15452.qm@web32005.mail.ssk.yahoo.co.jp

 · 

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: itoshun001@efeel.to, jorsol@gmail.com
  Subject: Re: old JDBC driver (8.1-JDBC3) can connect to postgresql 9.x ?
  In-Reply-To: <973148.15452.qm@web32005.mail.ssk.yahoo.co.jp>
  References: <887714.44014.qm@web32005.mail.ssk.yahoo.co.jp> <CA+cVU8N3_LFyHbs_5DLx-ys-oE+M1Dm-9cWJ6LfNuMfcbOq0Bw@mail.gmail.com> <902560.56013.qm@web32001.mail.ssk.yahoo.co.jp> <CA+cVU8PYLCgZ6mnXsbOn8r-uJ0QvRo7kqids0MnwUW77d+qj+A@mail.gmail.com> <235703.87762.qm@web32001.mail.ssk.yahoo.co.jp> <CA+cVU8Mfphd7P=7E9ZNpLPHk4EaN05VNLRmSsfMfAetgYvYQxg@mail.gmail.com> <973148.15452.qm@web32005.mail.ssk.yahoo.co.jp>

* 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