Re: [JDBC] Postgis example TestAutoregister is not working due tomissing getVersion() from pgjdbc community jar - Mailing list pgsql-jdbc

From Jorge Solórzano
Subject Re: [JDBC] Postgis example TestAutoregister is not working due tomissing getVersion() from pgjdbc community jar
Date
Msg-id CA+cVU8Nn5cdzg-PU3JpBtczmdh2Fa-2+PdBZUOCpksAd3MizhA@mail.gmail.com
Whole thread Raw
In response to Re: [JDBC] Postgis example TestAutoregister is not working due tomissing getVersion() from pgjdbc community jar  (Vladimir Sitnikov <sitnikov.vladimir@gmail.com>)
List pgsql-jdbc
Please don't remove the deprecated annotation, postgis-jdbc should have not used that method in first place, and it's just a convenience method that should not be public.
It's ok to have that method forever, but the deprecated annotation is a clear sign that it should not be used, for future use.

I get the problem with current getMajor/MinorVersion, but isn't more appropriate to redirect anyone directly to org.postgresql.util.DriverInfo for those that want "special" formating? (here with a big asterisk that this class should not be for "public use").

Jorge Solórzano

On Fri, Aug 4, 2017 at 11:42 AM, Vladimir Sitnikov <sitnikov.vladimir@gmail.com> wrote:
>If we are going to make methods public then we are sort of publishing a contract and we can't just go about removing them.

So we should invent the contract.

The "problem" with current Driver#getMajorVersion/getMinorVersion is the methods return just int, and they do not have a room for a full version (e.g. JRE variation).

Vladimir

pgsql-jdbc by date:

Previous
From: Vladimir Sitnikov
Date:
Subject: Re: [JDBC] Postgis example TestAutoregister is not working due tomissing getVersion() from pgjdbc community jar
Next
From: Jean Dannemann
Date:
Subject: Chage driver locale.