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

sql: compatibility between Datagrip and CockroachDB #20641

Closed
younisshah opened this issue Dec 12, 2017 · 7 comments
Closed

sql: compatibility between Datagrip and CockroachDB #20641

younisshah opened this issue Dec 12, 2017 · 7 comments
Labels
A-sql-pgcompat Semantic compatibility with PostgreSQL C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) meta-issue Contains a list of several other issues.

Comments

@younisshah
Copy link

younisshah commented Dec 12, 2017

This is a noob question.

How do I connect CockroachDB to JetBrains DataGrip? I know the API is Postgres compatible which means any client that can connect to Postgres, can connect to CockRoachDB. I tried. I failed.

I created a user and DB using Cockroach SQL CLI. Then I tried to connect to it using DataGrip but I get this error

Error encountered when performing Introspect schema demo_db: ERROR: column name "xmin" not found. ERROR: column name "xmin" not found

Appreciated!

@jordanlewis
Copy link
Member

Hi @younisshah,

CockroachDB is not supported by DataGrip at this time. Its Postgres adapter uses several Postgres features we don't support, such as xmin.

We would very much like to support DataGrip, but we'll never support a feature like xmin which is tied to Postgres's transaction implementation details. In my own testing it does appear that xmin is used to sort by most-recently-modified for schema elements, which seems like something we could fake by artificially returning 0, but I'm not sure what else that might break.

As DataGrip is not open source I can't comment on how difficult it might be to write a CockroachDB specific adapter.

@jordanlewis jordanlewis added the A-sql-pgcompat Semantic compatibility with PostgreSQL label Dec 13, 2017
@jordanlewis
Copy link
Member

I tested always returning 0 for xmin, which seems to superficially work. After adding several more missing virtual tables (#21065), merging in CTEs (#20374), and a sequences function (#21069), I discovered that DataGrip also emits a correlated subquery which we still don't support (#3288).

@bw-smarkwell
Copy link

Requested explicit support for CockroachDB at https://youtrack.jetbrains.com/issue/DBE-5835 from the DataGrip team.

@knz knz added this to the Later milestone Jan 30, 2018
@zvozin
Copy link

zvozin commented Mar 23, 2018

:bump: Here's what the Datagrip team states they need to support a new database: https://www.jetbrains.com/datagrip/new_dbms.

@bw-smarkwell
Copy link

Ok this is a bit weird to me, as a customer of DataGrip, they seem to put a lot of onus on the DB developer to do a significant chunk of integration work.

@knz knz added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) meta-issue Contains a list of several other issues. labels Apr 27, 2018
@knz knz changed the title Datagrip and CockroachDB sql: compatibility between Datagrip and CockroachDB Apr 27, 2018
@petermattis petermattis removed this from the Later milestone Oct 5, 2018
@kassak
Copy link

kassak commented Jul 2, 2019

Issue with xmins 've been fixed in DataGrip. Please report exact problems, because we fix connectivity/database detection problems for unsupported databases immediately, and "explicit support" is a feature request, which goes under low priority (that's why it took us so long to notice).
Feel free to open new issues if there are more problems

@jordanlewis
Copy link
Member

Thanks @kassak. DataGrip seems to be working pretty well right now, so I'm closing this. @younisshah please let us know if you have more issues and we'll do our best to resolve. Thanks!

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-pgcompat Semantic compatibility with PostgreSQL C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) meta-issue Contains a list of several other issues.
Projects
None yet
Development

No branches or pull requests

7 participants