Thread: Setting PG-version without recompiling

Setting PG-version without recompiling

From
Andreas Joseph Krogh
Date:
Hi.
 
I'm up for testing 9.4 but my JDBC-driver fails to connect due to PG's minor-version string: "4beta1".
Is it possible to set this somewhere without recompiling PG?
 
Thanks.
 
--
Andreas Jospeh Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
Attachment

Re: Setting PG-version without recompiling

From
Abhijit Menon-Sen
Date:
At 2014-07-03 11:02:34 +0200, andreas@visena.com wrote:
>
> Is it possible to set this somewhere without 
> recompiling PG?

I'm afraid not.

-- Abhijit



Re: Setting PG-version without recompiling

From
Andreas Joseph Krogh
Date:
På torsdag 03. juli 2014 kl. 11:13:44, skrev Abhijit Menon-Sen <ams@2ndQuadrant.com>:
At 2014-07-03 11:02:34 +0200, andreas@visena.com wrote:
>
> Is it possible to set this somewhere without
> recompiling PG?

I'm afraid not.
 
Ok
 
--
Andreas Jospeh Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
 
Attachment

Re: Setting PG-version without recompiling

From
Tom Lane
Date:
Andreas Joseph Krogh <andreas@visena.com> writes:
> Hi.   I'm up for testing 9.4 but my JDBC-driver fails to connect due to PG's
> minor-version string: "4beta1". Is it possible to set this somewhere without
> recompiling PG?

No, and even if you could, that would be the wrong approach.  The right
approach is to fix the JDBC driver to not complain about such version
strings.  I'm a bit surprised they haven't done so long since, considering
how long PG beta versions have been tagged like that.  For that matter,
they really ought not complain about strings like "9.5devel" or
"9.5alpha2" either.

            regards, tom lane


Re: Setting PG-version without recompiling

From
Andreas Joseph Krogh
Date:
På torsdag 03. juli 2014 kl. 16:16:01, skrev Tom Lane <tgl@sss.pgh.pa.us>:
Andreas Joseph Krogh <andreas@visena.com> writes:
> Hi. �� I'm up for testing 9.4 but my JDBC-driver fails to connect due to PG's
> minor-version string: "4beta1". Is it possible to set this somewhere without
> recompiling PG?

No, and even if you could, that would be the wrong approach.  The right
approach is to fix the JDBC driver to not complain about such version
strings.  I'm a bit surprised they haven't done so long since, considering
how long PG beta versions have been tagged like that.  For that matter,
they really ought not complain about strings like "9.5devel" or
"9.5alpha2" either.

regards, tom lane
 
I'm using the pgjdbc-ng driver, I'm sure the "official" driver handles this.
The driver will be fixed (the issue has a pull-request), I just wondered if there was a magic know I could use until the PR is merged.
 
--
Andreas Jospeh Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
 
Attachment

Re: [JDBC] Setting PG-version without recompiling

From
Craig Ringer
Date:
On 07/03/2014 10:16 PM, Tom Lane wrote:
> Andreas Joseph Krogh <andreas@visena.com> writes:
>> Hi. Â  I'm up for testing 9.4 but my JDBC-driver fails to connect due to PG's
>> minor-version string: "4beta1". Is it possible to set this somewhere without
>> recompiling PG?
>
> No, and even if you could, that would be the wrong approach.  The right
> approach is to fix the JDBC driver to not complain about such version
> strings.  I'm a bit surprised they haven't done so long since, considering
> how long PG beta versions have been tagged like that.  For that matter,
> they really ought not complain about strings like "9.5devel" or
> "9.5alpha2" either.

Yeah, that's  horrible. We should be using server_version_num .

It should be a quick enough fix, I'll take a look.

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services