Re: JDBC driver returns different version strings on Ubuntu and CentOS

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-jdbc(at)lists(dot)postgresql(dot)org
Subject: Re: JDBC driver returns different version strings on Ubuntu and CentOS
Date: 2018-02-21 07:40:08
Message-ID: 3094c13b-4ae0-1588-6a95-b60ad95a20b4@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Vladimir Sitnikov schrieb am 20.02.2018 um 10:45:
>>I am just wondering...
>
> It should be the value as is: https://github.com/pgjdbc/pgjdbc/blob/45c32bc6af2e140ff86dabd718344c74fc244394/pgjdbc/src/main/java/org/postgresql/core/v3/QueryExecutorImpl.java#L2637 
>
> Would you capture a connection trace? I mean loggerLevel=TRACE&loggerFile=pgjdbc-trace.log
> It would contain actual values that the server sends to the client in the handshake packets.

Sure, no problem.

I ran the following simple program:

String url = "jdbc:postgresql://hostname/postgres?loggerLevel=TRACE&loggerFile=c:/temp/pg/pgjdbc-trace.log";
Connection con = DriverManager.getConnection(url, "...", "...");
String version = con.getMetaData().getDatabaseProductVersion();
System.out.println(version);
con.close();

I have attached the logfiles for the connection to Ubuntu and CentOS.

I can however not see the version string in those logfiles.

Thomas

Attachment Content-Type Size
pgjdbc-trace-centos.log text/plain 6.9 KB
pgjdbc-trace-ubuntu.log text/plain 6.9 KB

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Jorge Solórzano 2018-02-21 17:33:20 Re: JDBC driver returns different version strings on Ubuntu and CentOS
Previous Message Vladimir Sitnikov 2018-02-20 09:45:52 Re: JDBC driver returns different version strings on Ubuntu and CentOS