Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dqmdev opened this issue Feb 17, 2024 · 0 comments

Comments

@dqmdev
Copy link

dqmdev commented Feb 17, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant