pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedJDBC driver returns different version strings on Ubuntu and CentOS
9+ messages / 3 participants
[nested] [flat]
* JDBC driver returns different version strings on Ubuntu and CentOS
@ 2018-02-19 15:52 Thomas Kellerer <spam_eater@gmx.net>
2018-02-19 17:04 ` Re: JDBC driver returns different version strings on Ubuntu and CentOS Jorge Solórzano <jorsol@gmail.com>
0 siblings, 1 reply; 9+ messages in thread
From: Thomas Kellerer @ 2018-02-19 15:52 UTC (permalink / raw)
To: pgsql-jdbc
I have just noticed that DatabaseMetaData.getDatabaseProductVersion() returns the String "10.2.2" when connected to a server running on Ubuntu, but returns "10.2" when connected to a server running on CentOS or Windows.
Is there a specific reason for this?
It's a bit confusing because 10.2.2 doesn't actually exists as a "real" Postgres version.
This happens with the driver versions 42.1.4 and 42.2.1 (haven tried others)
Regards
Thomas
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: JDBC driver returns different version strings on Ubuntu and CentOS
2018-02-19 15:52 JDBC driver returns different version strings on Ubuntu and CentOS Thomas Kellerer <spam_eater@gmx.net>
@ 2018-02-19 17:04 ` Jorge Solórzano <jorsol@gmail.com>
2018-02-20 07:46 ` Re: JDBC driver returns different version strings on Ubuntu and CentOS Thomas Kellerer <spam_eater@gmx.net>
0 siblings, 1 reply; 9+ messages in thread
From: Jorge Solórzano @ 2018-02-19 17:04 UTC (permalink / raw)
To: Thomas Kellerer <spam_eater@gmx.net>; +Cc: pgsql-jdbc
The DatabaseMetaData.getDatabaseProductVersion() returns the exact string
of ParameterStatus "server_version", and this version can be different from
ditro to distro, in my Ubuntu the "server_version" returns: "10.2 (Ubuntu
10.2-1.pgdg16.04+1)". In other words the version returned is not
"parsed/cleaned", and if you need to implement some logic based on the
version, is better to use getDatabaseMajorVersion() and
getDatabaseMinorVersion().
Regards.
On Mon, Feb 19, 2018 at 9:52 AM, Thomas Kellerer <spam_eater@gmx.net> wrote:
> I have just noticed that DatabaseMetaData.getDatabaseProductVersion()
> returns the String "10.2.2" when connected to a server running on Ubuntu,
> but returns "10.2" when connected to a server running on CentOS or Windows.
>
> Is there a specific reason for this?
>
> It's a bit confusing because 10.2.2 doesn't actually exists as a "real"
> Postgres version.
>
> This happens with the driver versions 42.1.4 and 42.2.1 (haven tried
> others)
>
> Regards
> Thomas
>
>
>
>
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: JDBC driver returns different version strings on Ubuntu and CentOS
2018-02-19 15:52 JDBC driver returns different version strings on Ubuntu and CentOS Thomas Kellerer <spam_eater@gmx.net>
2018-02-19 17:04 ` Re: JDBC driver returns different version strings on Ubuntu and CentOS Jorge Solórzano <jorsol@gmail.com>
@ 2018-02-20 07:46 ` Thomas Kellerer <spam_eater@gmx.net>
2018-02-20 09:45 ` Re: JDBC driver returns different version strings on Ubuntu and CentOS Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
0 siblings, 1 reply; 9+ messages in thread
From: Thomas Kellerer @ 2018-02-20 07:46 UTC (permalink / raw)
To: pgsql-jdbc
Hmm, there must be _some_ parsing going on, because
select current_setting('server_version')
returns "10.2 (Ubuntu 10.2-1.pgdg16.04+1)" on the Ubuntu installation, so I wonder how the 10.2.2 is created from that by the JDBC driver.
It is not really important, I am just wondering...
Regards
Thomas
Jorge Solórzano schrieb am 19.02.2018 um 18:04:
> The DatabaseMetaData.getDatabaseProductVersion() returns the exact
> string of ParameterStatus "server_version", and this version can be
> different from ditro to distro, in my Ubuntu the "server_version"
> returns: "10.2 (Ubuntu 10.2-1.pgdg16.04+1)". In other words the
> version returned is not "parsed/cleaned", and if you need to
> implement some logic based on the version, is better to use
> getDatabaseMajorVersion() and getDatabaseMinorVersion().
>
> Regards.
>
> On Mon, Feb 19, 2018 at 9:52 AM, Thomas Kellerer <spam_eater@gmx.net <mailto:spam_eater@gmx.net>> wrote:
>
> I have just noticed that DatabaseMetaData.getDatabaseProductVersion() returns the String "10.2.2" when connected to a server running on Ubuntu, but returns "10.2" when connected to a server running on CentOS or Windows.
>
> Is there a specific reason for this?
>
> It's a bit confusing because 10.2.2 doesn't actually exists as a "real" Postgres version.
>
> This happens with the driver versions 42.1.4 and 42.2.1 (haven tried others)
>
> Regards
> Thomas
>
>
>
>
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: JDBC driver returns different version strings on Ubuntu and CentOS
2018-02-19 15:52 JDBC driver returns different version strings on Ubuntu and CentOS Thomas Kellerer <spam_eater@gmx.net>
2018-02-19 17:04 ` Re: JDBC driver returns different version strings on Ubuntu and CentOS Jorge Solórzano <jorsol@gmail.com>
2018-02-20 07:46 ` Re: JDBC driver returns different version strings on Ubuntu and CentOS Thomas Kellerer <spam_eater@gmx.net>
@ 2018-02-20 09:45 ` Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
2018-02-21 07:40 ` Re: JDBC driver returns different version strings on Ubuntu and CentOS Thomas Kellerer <spam_eater@gmx.net>
0 siblings, 1 reply; 9+ messages in thread
From: Vladimir Sitnikov @ 2018-02-20 09:45 UTC (permalink / raw)
To: Thomas Kellerer <spam_eater@gmx.net>; +Cc: pgsql-jdbc
>I am just wondering...
It should be the value as is:
https://github.com/pgjdbc/pgjdbc/blob/45c32bc6af2e140ff86dabd718344c74fc244394/pgjdbc/src/main/java/...
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.
Vladimir
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: JDBC driver returns different version strings on Ubuntu and CentOS
2018-02-19 15:52 JDBC driver returns different version strings on Ubuntu and CentOS Thomas Kellerer <spam_eater@gmx.net>
2018-02-19 17:04 ` Re: JDBC driver returns different version strings on Ubuntu and CentOS Jorge Solórzano <jorsol@gmail.com>
2018-02-20 07:46 ` Re: JDBC driver returns different version strings on Ubuntu and CentOS Thomas Kellerer <spam_eater@gmx.net>
2018-02-20 09:45 ` Re: JDBC driver returns different version strings on Ubuntu and CentOS Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
@ 2018-02-21 07:40 ` Thomas Kellerer <spam_eater@gmx.net>
2018-02-21 17:33 ` Re: JDBC driver returns different version strings on Ubuntu and CentOS Jorge Solórzano <jorsol@gmail.com>
0 siblings, 1 reply; 9+ messages in thread
From: Thomas Kellerer @ 2018-02-21 07:40 UTC (permalink / raw)
To: pgsql-jdbc@lists.postgresql.org
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/...
>
> 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
Attachments:
pgjdbc-trace-centos.log (text/plain, 6.9K) download
Feb 21, 2018 8:37:32 AM org.postgresql.Driver connect
FINE: Connecting with URL: jdbc:postgresql://centos01:5432/postgres?loggerLevel=TRACE&loggerFile=c:/temp/pg/pgjdbc-trace-centos.log
Feb 21, 2018 8:37:32 AM org.postgresql.jdbc.PgConnection <init>
FINE: PostgreSQL JDBC Driver 42.2.1
Feb 21, 2018 8:37:32 AM org.postgresql.jdbc.PgConnection setDefaultFetchSize
FINE: setDefaultFetchSize = 0
Feb 21, 2018 8:37:32 AM org.postgresql.jdbc.PgConnection setPrepareThreshold
FINE: setPrepareThreshold = 5
Feb 21, 2018 8:37:32 AM org.postgresql.core.v3.ConnectionFactoryImpl openConnectionImpl
FINE: Trying to establish a protocol version 3 connection to centos01:5432
Feb 21, 2018 8:37:33 AM org.postgresql.core.Encoding <init>
FINEST: Creating new Encoding UTF-8 with fastASCIINumbers true
Feb 21, 2018 8:37:33 AM org.postgresql.core.Encoding <init>
FINEST: Creating new Encoding UTF-8 with fastASCIINumbers true
Feb 21, 2018 8:37:33 AM org.postgresql.core.Encoding <init>
FINEST: Creating new Encoding UTF-8 with fastASCIINumbers true
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.ConnectionFactoryImpl openConnectionImpl
FINE: Receive Buffer Size is 65,536
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.ConnectionFactoryImpl openConnectionImpl
FINE: Send Buffer Size is 65,536
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.ConnectionFactoryImpl sendStartupPacket
FINEST: FE=> StartupPacket(user=thomas, database=postgres, client_encoding=UTF8, DateStyle=ISO, TimeZone=Europe/Berlin, extra_float_digits=2)
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.ConnectionFactoryImpl doAuthentication
FINEST: <=BE AuthenticationReqMD5(salt=f6743d61)
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.ConnectionFactoryImpl doAuthentication
FINEST: FE=> Password(md5digest=md564a2017a4355d67426e1ba3405e14df8)
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.ConnectionFactoryImpl doAuthentication
FINEST: <=BE AuthenticationOk
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.QueryExecutorImpl receiveParameterStatus
FINEST: <=BE ParameterStatus(application_name = )
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.QueryExecutorImpl receiveParameterStatus
FINEST: <=BE ParameterStatus(client_encoding = UTF8)
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.QueryExecutorImpl receiveParameterStatus
FINEST: <=BE ParameterStatus(DateStyle = ISO, MDY)
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.QueryExecutorImpl receiveParameterStatus
FINEST: <=BE ParameterStatus(integer_datetimes = on)
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.QueryExecutorImpl receiveParameterStatus
FINEST: <=BE ParameterStatus(IntervalStyle = postgres)
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.QueryExecutorImpl receiveParameterStatus
FINEST: <=BE ParameterStatus(is_superuser = off)
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.QueryExecutorImpl receiveParameterStatus
FINEST: <=BE ParameterStatus(server_encoding = UTF8)
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.QueryExecutorImpl receiveParameterStatus
FINEST: <=BE ParameterStatus(server_version = 10.2)
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.QueryExecutorImpl receiveParameterStatus
FINEST: <=BE ParameterStatus(session_authorization = thomas)
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.QueryExecutorImpl receiveParameterStatus
FINEST: <=BE ParameterStatus(standard_conforming_strings = on)
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.QueryExecutorImpl receiveParameterStatus
FINEST: <=BE ParameterStatus(TimeZone = Europe/Berlin)
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.QueryExecutorImpl readStartupMessages
FINEST: <=BE BackendKeyData(pid=24,214,ckey=1,764,107,306)
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.QueryExecutorImpl receiveRFQ
FINEST: <=BE ReadyForQuery(I)
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.QueryExecutorImpl execute
FINEST: simple execute, handler=org.postgresql.core.SetupQueryRunner$SimpleResultHandler@3a4afd8d, maxRows=0, fetchSize=0, flags=1,047
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.QueryExecutorImpl sendParse
FINEST: FE=> Parse(stmt=null,query="SET extra_float_digits = 3",oids={})
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.QueryExecutorImpl sendBind
FINEST: FE=> Bind(stmt=null,portal=null)
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.QueryExecutorImpl sendExecute
FINEST: FE=> Execute(portal=null,limit=1)
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.QueryExecutorImpl sendSync
FINEST: FE=> Sync
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.QueryExecutorImpl processResults
FINEST: <=BE ParseComplete [null]
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.QueryExecutorImpl processResults
FINEST: <=BE BindComplete [unnamed]
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.QueryExecutorImpl receiveCommandStatus
FINEST: <=BE CommandStatus(SET)
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.QueryExecutorImpl receiveRFQ
FINEST: <=BE ReadyForQuery(I)
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.QueryExecutorImpl execute
FINEST: simple execute, handler=org.postgresql.core.SetupQueryRunner$SimpleResultHandler@424c0bc4, maxRows=0, fetchSize=0, flags=1,047
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.QueryExecutorImpl sendParse
FINEST: FE=> Parse(stmt=null,query="SET application_name = 'PostgreSQL JDBC Driver'",oids={})
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.QueryExecutorImpl sendBind
FINEST: FE=> Bind(stmt=null,portal=null)
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.QueryExecutorImpl sendExecute
FINEST: FE=> Execute(portal=null,limit=1)
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.QueryExecutorImpl sendSync
FINEST: FE=> Sync
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.QueryExecutorImpl processResults
FINEST: <=BE ParseComplete [null]
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.QueryExecutorImpl processResults
FINEST: <=BE BindComplete [unnamed]
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.QueryExecutorImpl receiveParameterStatus
FINEST: <=BE ParameterStatus(application_name = PostgreSQL JDBC Driver)
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.QueryExecutorImpl receiveCommandStatus
FINEST: <=BE CommandStatus(SET)
Feb 21, 2018 8:37:33 AM org.postgresql.core.v3.QueryExecutorImpl receiveRFQ
FINEST: <=BE ReadyForQuery(I)
Feb 21, 2018 8:37:33 AM org.postgresql.jdbc.PgConnection <init>
FINEST: types using binary send = TIMESTAMPTZ,UUID,INT2_ARRAY,INT4_ARRAY,BYTEA,TEXT_ARRAY,TIMETZ,INT8,INT2,INT4,VARCHAR_ARRAY,INT8_ARRAY,POINT,TIMESTAMP,TIME,BOX,FLOAT4,FLOAT8,FLOAT4_ARRAY,FLOAT8_ARRAY
Feb 21, 2018 8:37:33 AM org.postgresql.jdbc.PgConnection <init>
FINEST: types using binary receive = TIMESTAMPTZ,UUID,INT2_ARRAY,INT4_ARRAY,BYTEA,TEXT_ARRAY,TIMETZ,INT8,INT2,INT4,VARCHAR_ARRAY,INT8_ARRAY,POINT,DATE,TIMESTAMP,TIME,BOX,FLOAT4,FLOAT8,FLOAT4_ARRAY,FLOAT8_ARRAY
Feb 21, 2018 8:37:33 AM org.postgresql.jdbc.PgConnection <init>
FINEST: integer date/time = true
Feb 21, 2018 8:37:33 AM org.postgresql.core.QueryExecutorBase close
FINEST: FE=> Terminate
pgjdbc-trace-ubuntu.log (text/plain, 6.9K) download
Feb 21, 2018 8:38:17 AM org.postgresql.Driver connect
FINE: Connecting with URL: jdbc:postgresql://ubuntu01:5432/postgres?loggerLevel=TRACE&loggerFile=c:/temp/pg/pgjdbc-trace-ubuntu.log
Feb 21, 2018 8:38:17 AM org.postgresql.jdbc.PgConnection <init>
FINE: PostgreSQL JDBC Driver 42.2.1
Feb 21, 2018 8:38:17 AM org.postgresql.jdbc.PgConnection setDefaultFetchSize
FINE: setDefaultFetchSize = 0
Feb 21, 2018 8:38:17 AM org.postgresql.jdbc.PgConnection setPrepareThreshold
FINE: setPrepareThreshold = 5
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.ConnectionFactoryImpl openConnectionImpl
FINE: Trying to establish a protocol version 3 connection to ubuntu01:5432
Feb 21, 2018 8:38:17 AM org.postgresql.core.Encoding <init>
FINEST: Creating new Encoding UTF-8 with fastASCIINumbers true
Feb 21, 2018 8:38:17 AM org.postgresql.core.Encoding <init>
FINEST: Creating new Encoding UTF-8 with fastASCIINumbers true
Feb 21, 2018 8:38:17 AM org.postgresql.core.Encoding <init>
FINEST: Creating new Encoding UTF-8 with fastASCIINumbers true
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.ConnectionFactoryImpl openConnectionImpl
FINE: Receive Buffer Size is 65,536
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.ConnectionFactoryImpl openConnectionImpl
FINE: Send Buffer Size is 65,536
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.ConnectionFactoryImpl sendStartupPacket
FINEST: FE=> StartupPacket(user=thomas, database=postgres, client_encoding=UTF8, DateStyle=ISO, TimeZone=Europe/Berlin, extra_float_digits=2)
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.ConnectionFactoryImpl doAuthentication
FINEST: <=BE AuthenticationReqMD5(salt=a54b6ab9)
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.ConnectionFactoryImpl doAuthentication
FINEST: FE=> Password(md5digest=md5c56ef81bef229af134a36c53de1c9a1c)
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.ConnectionFactoryImpl doAuthentication
FINEST: <=BE AuthenticationOk
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.QueryExecutorImpl receiveParameterStatus
FINEST: <=BE ParameterStatus(application_name = )
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.QueryExecutorImpl receiveParameterStatus
FINEST: <=BE ParameterStatus(client_encoding = UTF8)
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.QueryExecutorImpl receiveParameterStatus
FINEST: <=BE ParameterStatus(DateStyle = ISO, DMY)
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.QueryExecutorImpl receiveParameterStatus
FINEST: <=BE ParameterStatus(integer_datetimes = on)
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.QueryExecutorImpl receiveParameterStatus
FINEST: <=BE ParameterStatus(IntervalStyle = postgres)
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.QueryExecutorImpl receiveParameterStatus
FINEST: <=BE ParameterStatus(is_superuser = on)
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.QueryExecutorImpl receiveParameterStatus
FINEST: <=BE ParameterStatus(server_encoding = UTF8)
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.QueryExecutorImpl receiveParameterStatus
FINEST: <=BE ParameterStatus(server_version = 10.2 (Ubuntu 10.2-1.pgdg16.04+1))
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.QueryExecutorImpl receiveParameterStatus
FINEST: <=BE ParameterStatus(session_authorization = thomas)
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.QueryExecutorImpl receiveParameterStatus
FINEST: <=BE ParameterStatus(standard_conforming_strings = on)
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.QueryExecutorImpl receiveParameterStatus
FINEST: <=BE ParameterStatus(TimeZone = Europe/Berlin)
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.QueryExecutorImpl readStartupMessages
FINEST: <=BE BackendKeyData(pid=28,881,ckey=1,962,455,000)
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.QueryExecutorImpl receiveRFQ
FINEST: <=BE ReadyForQuery(I)
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.QueryExecutorImpl execute
FINEST: simple execute, handler=org.postgresql.core.SetupQueryRunner$SimpleResultHandler@3a4afd8d, maxRows=0, fetchSize=0, flags=1,047
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.QueryExecutorImpl sendParse
FINEST: FE=> Parse(stmt=null,query="SET extra_float_digits = 3",oids={})
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.QueryExecutorImpl sendBind
FINEST: FE=> Bind(stmt=null,portal=null)
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.QueryExecutorImpl sendExecute
FINEST: FE=> Execute(portal=null,limit=1)
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.QueryExecutorImpl sendSync
FINEST: FE=> Sync
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.QueryExecutorImpl processResults
FINEST: <=BE ParseComplete [null]
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.QueryExecutorImpl processResults
FINEST: <=BE BindComplete [unnamed]
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.QueryExecutorImpl receiveCommandStatus
FINEST: <=BE CommandStatus(SET)
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.QueryExecutorImpl receiveRFQ
FINEST: <=BE ReadyForQuery(I)
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.QueryExecutorImpl execute
FINEST: simple execute, handler=org.postgresql.core.SetupQueryRunner$SimpleResultHandler@424c0bc4, maxRows=0, fetchSize=0, flags=1,047
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.QueryExecutorImpl sendParse
FINEST: FE=> Parse(stmt=null,query="SET application_name = 'PostgreSQL JDBC Driver'",oids={})
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.QueryExecutorImpl sendBind
FINEST: FE=> Bind(stmt=null,portal=null)
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.QueryExecutorImpl sendExecute
FINEST: FE=> Execute(portal=null,limit=1)
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.QueryExecutorImpl sendSync
FINEST: FE=> Sync
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.QueryExecutorImpl processResults
FINEST: <=BE ParseComplete [null]
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.QueryExecutorImpl processResults
FINEST: <=BE BindComplete [unnamed]
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.QueryExecutorImpl receiveParameterStatus
FINEST: <=BE ParameterStatus(application_name = PostgreSQL JDBC Driver)
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.QueryExecutorImpl receiveCommandStatus
FINEST: <=BE CommandStatus(SET)
Feb 21, 2018 8:38:17 AM org.postgresql.core.v3.QueryExecutorImpl receiveRFQ
FINEST: <=BE ReadyForQuery(I)
Feb 21, 2018 8:38:17 AM org.postgresql.jdbc.PgConnection <init>
FINEST: types using binary send = TIMESTAMPTZ,UUID,INT2_ARRAY,INT4_ARRAY,BYTEA,TEXT_ARRAY,TIMETZ,INT8,INT2,INT4,VARCHAR_ARRAY,INT8_ARRAY,POINT,TIMESTAMP,TIME,BOX,FLOAT4,FLOAT8,FLOAT4_ARRAY,FLOAT8_ARRAY
Feb 21, 2018 8:38:17 AM org.postgresql.jdbc.PgConnection <init>
FINEST: types using binary receive = TIMESTAMPTZ,UUID,INT2_ARRAY,INT4_ARRAY,BYTEA,TEXT_ARRAY,TIMETZ,INT8,INT2,INT4,VARCHAR_ARRAY,INT8_ARRAY,POINT,DATE,TIMESTAMP,TIME,BOX,FLOAT4,FLOAT8,FLOAT4_ARRAY,FLOAT8_ARRAY
Feb 21, 2018 8:38:17 AM org.postgresql.jdbc.PgConnection <init>
FINEST: integer date/time = true
Feb 21, 2018 8:38:17 AM org.postgresql.core.QueryExecutorBase close
FINEST: FE=> Terminate
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: JDBC driver returns different version strings on Ubuntu and CentOS
2018-02-19 15:52 JDBC driver returns different version strings on Ubuntu and CentOS Thomas Kellerer <spam_eater@gmx.net>
2018-02-19 17:04 ` Re: JDBC driver returns different version strings on Ubuntu and CentOS Jorge Solórzano <jorsol@gmail.com>
2018-02-20 07:46 ` Re: JDBC driver returns different version strings on Ubuntu and CentOS Thomas Kellerer <spam_eater@gmx.net>
2018-02-20 09:45 ` Re: JDBC driver returns different version strings on Ubuntu and CentOS Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
2018-02-21 07:40 ` Re: JDBC driver returns different version strings on Ubuntu and CentOS Thomas Kellerer <spam_eater@gmx.net>
@ 2018-02-21 17:33 ` Jorge Solórzano <jorsol@gmail.com>
2018-02-21 17:43 ` Re: JDBC driver returns different version strings on Ubuntu and CentOS Thomas Kellerer <spam_eater@gmx.net>
0 siblings, 1 reply; 9+ messages in thread
From: Jorge Solórzano @ 2018-02-21 17:33 UTC (permalink / raw)
To: Thomas Kellerer <spam_eater@gmx.net>; +Cc: pgsql-jdbc@lists.postgresql.org
On Wed, Feb 21, 2018 at 1:40 AM, Thomas Kellerer <spam_eater@gmx.net> wrote:
>
> I can however not see the version string in those logfiles.
>
>
For CentOS is:
<=BE ParameterStatus(server_version = 10.2)
For Ubuntu is:
<=BE ParameterStatus(server_version = 10.2 (Ubuntu 10.2-1.pgdg16.04+1))
Not sure where you get "10.2.2".
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: JDBC driver returns different version strings on Ubuntu and CentOS
2018-02-19 15:52 JDBC driver returns different version strings on Ubuntu and CentOS Thomas Kellerer <spam_eater@gmx.net>
2018-02-19 17:04 ` Re: JDBC driver returns different version strings on Ubuntu and CentOS Jorge Solórzano <jorsol@gmail.com>
2018-02-20 07:46 ` Re: JDBC driver returns different version strings on Ubuntu and CentOS Thomas Kellerer <spam_eater@gmx.net>
2018-02-20 09:45 ` Re: JDBC driver returns different version strings on Ubuntu and CentOS Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
2018-02-21 07:40 ` Re: JDBC driver returns different version strings on Ubuntu and CentOS Thomas Kellerer <spam_eater@gmx.net>
2018-02-21 17:33 ` Re: JDBC driver returns different version strings on Ubuntu and CentOS Jorge Solórzano <jorsol@gmail.com>
@ 2018-02-21 17:43 ` Thomas Kellerer <spam_eater@gmx.net>
2018-02-21 18:07 ` Re: JDBC driver returns different version strings on Ubuntu and CentOS Jorge Solórzano <jorsol@gmail.com>
2018-02-21 18:25 ` Re: JDBC driver returns different version strings on Ubuntu and CentOS Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
0 siblings, 2 replies; 9+ messages in thread
From: Thomas Kellerer @ 2018-02-21 17:43 UTC (permalink / raw)
To: ; +Cc: pgsql-jdbc@lists.postgresql.org
Jorge Solórzano schrieb am 21.02.2018 um 18:33:
> On Wed, Feb 21, 2018 at 1:40 AM, Thomas Kellerer <spam_eater@gmx.net <mailto:spam_eater@gmx.net>> wrote:
>
> For CentOS is:
>
> <=BE ParameterStatus(server_version = 10.2)
>
> For Ubuntu is:
>
> <=BE ParameterStatus(server_version = 10.2 (Ubuntu 10.2-1.pgdg16.04+1))
>
>
>
> Not sure where you get "10.2.2".
As I said, that's the return value of DatabaseMetaData.getDatabaseProductVersion()
So apparently there *is* some parsing going on.
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: JDBC driver returns different version strings on Ubuntu and CentOS
2018-02-19 15:52 JDBC driver returns different version strings on Ubuntu and CentOS Thomas Kellerer <spam_eater@gmx.net>
2018-02-19 17:04 ` Re: JDBC driver returns different version strings on Ubuntu and CentOS Jorge Solórzano <jorsol@gmail.com>
2018-02-20 07:46 ` Re: JDBC driver returns different version strings on Ubuntu and CentOS Thomas Kellerer <spam_eater@gmx.net>
2018-02-20 09:45 ` Re: JDBC driver returns different version strings on Ubuntu and CentOS Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
2018-02-21 07:40 ` Re: JDBC driver returns different version strings on Ubuntu and CentOS Thomas Kellerer <spam_eater@gmx.net>
2018-02-21 17:33 ` Re: JDBC driver returns different version strings on Ubuntu and CentOS Jorge Solórzano <jorsol@gmail.com>
2018-02-21 17:43 ` Re: JDBC driver returns different version strings on Ubuntu and CentOS Thomas Kellerer <spam_eater@gmx.net>
@ 2018-02-21 18:07 ` Jorge Solórzano <jorsol@gmail.com>
1 sibling, 0 replies; 9+ messages in thread
From: Jorge Solórzano @ 2018-02-21 18:07 UTC (permalink / raw)
To: Thomas Kellerer <spam_eater@gmx.net>; +Cc: pgsql-jdbc@lists.postgresql.org
On Wed, Feb 21, 2018 at 11:43 AM, Thomas Kellerer <spam_eater@gmx.net>
wrote:
>
> As I said, that's the return value of DatabaseMetaData.
>
> getDatabaseProductVersion()
>
> So apparently there *is* some parsing going on.
>
>
PgDatabaseMetaData.getDatabaseProductVersion() calls
connection.getDBVersionNumber();
https://github.com/pgjdbc/pgjdbc/blob/45c32bc6af2e140ff86dabd718344c74fc244394/pgjdbc/src/main/java/...
PgConnection.getDBVersionNumber() calls queryExecutor.getServerVersion();
https://github.com/pgjdbc/pgjdbc/blob/45c32bc6af2e140ff86dabd718344c74fc244394/pgjdbc/src/main/java/...
The receiveParameterStatus() of QueryExecutorImpl calls
setServerVersion(value) of QueryExecutorBase:
https://github.com/pgjdbc/pgjdbc/blob/45c32bc6af2e140ff86dabd718344c74fc244394/pgjdbc/src/main/java/...
https://github.com/pgjdbc/pgjdbc/blob/45c32bc6af2e140ff86dabd718344c74fc244394/pgjdbc/src/main/java/...
There is no parsing going on.
In my Ubuntu
getDatabaseProductVersion() returns "10.2 (Ubuntu 10.2-1.pgdg16.04+1)".
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: JDBC driver returns different version strings on Ubuntu and CentOS
2018-02-19 15:52 JDBC driver returns different version strings on Ubuntu and CentOS Thomas Kellerer <spam_eater@gmx.net>
2018-02-19 17:04 ` Re: JDBC driver returns different version strings on Ubuntu and CentOS Jorge Solórzano <jorsol@gmail.com>
2018-02-20 07:46 ` Re: JDBC driver returns different version strings on Ubuntu and CentOS Thomas Kellerer <spam_eater@gmx.net>
2018-02-20 09:45 ` Re: JDBC driver returns different version strings on Ubuntu and CentOS Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
2018-02-21 07:40 ` Re: JDBC driver returns different version strings on Ubuntu and CentOS Thomas Kellerer <spam_eater@gmx.net>
2018-02-21 17:33 ` Re: JDBC driver returns different version strings on Ubuntu and CentOS Jorge Solórzano <jorsol@gmail.com>
2018-02-21 17:43 ` Re: JDBC driver returns different version strings on Ubuntu and CentOS Thomas Kellerer <spam_eater@gmx.net>
@ 2018-02-21 18:25 ` Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
1 sibling, 0 replies; 9+ messages in thread
From: Vladimir Sitnikov @ 2018-02-21 18:25 UTC (permalink / raw)
To: Thomas Kellerer <spam_eater@gmx.net>; +Cc: pgsql-jdbc@lists.postgresql.org
>DatabaseMetaData.getDatabaseProductVersion()
Would you add a breakpoint to that method and capture a screenshot?
The code should just take a server_version as is and return it as is.
Vladimir
^ permalink raw reply [nested|flat] 9+ messages in thread
end of thread, other threads:[~2018-02-21 18:25 UTC | newest]
Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-02-19 15:52 JDBC driver returns different version strings on Ubuntu and CentOS Thomas Kellerer <spam_eater@gmx.net>
2018-02-19 17:04 ` Jorge Solórzano <jorsol@gmail.com>
2018-02-20 07:46 ` Thomas Kellerer <spam_eater@gmx.net>
2018-02-20 09:45 ` Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
2018-02-21 07:40 ` Thomas Kellerer <spam_eater@gmx.net>
2018-02-21 17:33 ` Jorge Solórzano <jorsol@gmail.com>
2018-02-21 17:43 ` Thomas Kellerer <spam_eater@gmx.net>
2018-02-21 18:07 ` Jorge Solórzano <jorsol@gmail.com>
2018-02-21 18:25 ` Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
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