Thread: haveMinimumCompatibleVersion

haveMinimumCompatibleVersion

From
Felipe Schnack
Date:
  I'm writing some methods for the jdbc driver...
  In my method I wall this:

 connection.haveMinimumCompatibleVersion("7.3")

  But it returns true in a 7.2.x pgsql. Why?? I want the feature to be
avaliable only in 7.3 or newer

--

Felipe Schnack
Analista de Sistemas
felipes@ritterdosreis.br
Cel.: (51)91287530
Linux Counter #281893

Faculdade Ritter dos Reis
www.ritterdosreis.br
felipes@ritterdosreis.br
Fone/Fax.: (51)32303328


Re: haveMinimumCompatibleVersion

From
Barry Lind
Date:
Felipe,

You are looking at the wrong method.  Look at haveMinimumServerVersion()
instead.

haveMinimumServerVersion() has the behavior you are looking for (is the
server I am connected to at least X).

havaMinimumCompatibleVersion() checks if the user has specified what
level of functionality (by setting the compatible parameter) they are
looking for.  So if they are running the 7.3 driver, do they want it
work like the 7.1 driver did for some features.  This has nothing to do
with the version of the database at all.

thanks,
--Barry



Felipe Schnack wrote:
>   I'm writing some methods for the jdbc driver...
>   In my method I wall this:
>
>  connection.haveMinimumCompatibleVersion("7.3")
>
>   But it returns true in a 7.2.x pgsql. Why?? I want the feature to be
> avaliable only in 7.3 or newer
>