-
Notifications
You must be signed in to change notification settings - Fork 821
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
java.sql.DatabaseMetaData.getImportedKeys()/getMaxIndexKeys() fails against Amazon Redshift #79
Comments
if it presents as 8.0 and the code checks for min version >= 7.3 then it Dave Cramer On Mon, Aug 12, 2013 at 6:28 PM, garrettpatterson
|
I think they recommend using only 8.4 |
Redshift presents as >8, yet the auto-discovery query for PostGres version 8 and up does not work. The query that does work and matches the metadata schema is that of Postgres version >=7.3 but < version 8. I wouldn't consider "I think they recommend using only 8.4" a decent reason to close this. |
I'll reopen it for now then. I have to find a way to get a hold of redshift. In some ways it's really their bug |
Agreed - they're the ones doing out of band things. thanks for re-opening, would be fine if this went to an enhancement instead since its more about support than a true bug. |
On 04/26/2014 03:57 AM, Dave Cramer wrote:
I have some contacts within Amazon here. I'll get in touch and see if I Craig Ringer http://www.2ndQuadrant.com/ |
I've had no response from Amazon/ParAccel. They seem to content to ignore issues with Redshift and PgJDBC. |
Well I have an account they will let us use, but I'm less than motivated to Dave Cramer On 26 June 2014 05:21, Craig Ringer notifications@github.com wrote:
|
On 06/26/2014 05:44 PM, Dave Cramer wrote:
... and they still haven't donated one to the SQLFiddle folks, AFAIK. I see little reason to put any effort into supporting their Craig Ringer http://www.2ndQuadrant.com/ |
Not going to fix this |
When using Mondrian schema workbench, it is unable to list databases in the schema, the error is: org.postgresql.util.PSQLException: "Unable to determine a value for MaxIndexKeys due to missing system catalog data."
It appears to be incompatibility of SQL used to query metadata and the version which Redshift presents itself as:
https://github.com/pgjdbc/pgjdbc/blob/master/org/postgresql/jdbc2/AbstractJdbc2DatabaseMetaData.java#L46-59
The query it tries to run reporting as an 8.0 PostgreSQL:
SELECT * FROM pg_catalog.pg_settings WHERE name='max_index_keys'
Query that actually works (Min version >= 7.3 query):
SELECT t1.typlen/t2.typlen from pg_catalog.pg_namespace n, pg_catalog.pg_type t1, pg_catalog.pg_type t2 WHERE t1.typnamespace=n.oid AND n.nspname='pg_catalog' AND t1.typelem=t2.oid AND t1.typname='oidvector'
Is there a way to determine a Redshift version within the driver? Set something in JDBC configuration for Redshift?
The text was updated successfully, but these errors were encountered: