aws / aws/amazon-redshift-jdbc-driver

Why is DatabaseMetadata.getProductVersion returning the Postgres version number

Open
#109 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
71
Forks
42
PR merge metrics
No merged PRs in 30d

Description

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().

Contributor guide

Open the contributing guide

Research direction

Start by inspecting the JDBC driver's DatabaseMetadata implementation and the version() behavior described in the report. Check the JDBC specification for getDatabaseProductVersion, getDatabaseMajorVersion, and getDatabaseMinorVersion, then compare the documented contract with the Redshift and PostgreSQL version values. Done means determining whether the returned 8.0 values are compliant and documenting or correcting the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, postgresql
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.