aws / amazon-redshift-jdbc-driver

Redshift JDBC Driver. It supports JDBC 4.2 specification.
Apache License 2.0
63 stars 31 forks source link

Why is DatabaseMetadata.getProductVersion returning the Postgres version number #109

Open dqmdev opened 9 months ago

dqmdev commented 9 months ago

Amazon Redshift JDBC driver v2.1.0.25

The driver implementation of DatabaseMetadata returns the following values.

getDatabaseProductVersion 8.0.2 getDatabaseMajorVersion 8 getDatabaseMinorVersion 0

Meanwhile version() returns PostgreSQL 8.0.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3), Redshift 1.0.62922

If an application uses getDatabaseMajor and Minor version methods, why is it returning 8.0 and not 1.0 (Cluster version)?

Is the a defect and if not, why return the Postgres number?

Granted, if we need to detect the Redshift version, we can call version() explicitly, but why re Major.Minor. Given JDBC did not provide for getSubminor methods it implies an application has to search for the cluster number from version().