ipython-sql
ipython-sql copied to clipboard
support cockroachdb
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.