ipython-sql icon indicating copy to clipboard operation
ipython-sql copied to clipboard

support cockroachdb

Open dbist opened this issue 5 years ago • 0 comments

please see comments in the cockroach issue: https://github.com/cockroachdb/cockroach/issues/46481

The problem seems to be this if-statement in ipython-sql:

        if first_word.startswith('\\') and 'postgres' in str(conn.dialect):
            if not PGSpecial:
                raise ImportError('pgspecial not installed')
            pgspecial = PGSpecial()

https://github.com/catherinedevlin/ipython-sql/blob/ad79dd7bbb07a9a5f0a61ba2758295d7d5d0c9b2/src/sql/run.py#L354

It will only use pgspecial if postgres is part of the connection string. But in order to connect to CockroachDB, the connection string must begin with cockroachdb.

dbist avatar May 19 '20 16:05 dbist