catherinedevlin/ipython-sql

support cockroachdb

dbist opened this issue · 0 comments

dbist commented

please see comments in the cockroach issue: cockroachdb/cockroach#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()

if first_word.startswith('\\') and 'postgres' in str(conn.dialect):

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.