Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Postico crashes with CockroachDB 2.1 rc-1 #600
CockroachDB used to work with Postico.
We suspect that Postico now attempts to take advantage of Cockroach unique show columns instead of using Postgres standard. Postico should use the Postgres standard approach rather than CockroachDB specific implementation in this case.
A little more detail:
CockroachDB changed the schema of its
Postico should stick with the ordinary Postgres way of determining things - use
Thanks for letting us know!
Unfortunately it's not as easy as disabling the special handling of CockroachDB, since Cockroach doesn't seem to support the queries we use to query pg_catalog.
Here's one of the queries that trips up CockroachDB if I remove the special handling:
SELECT pg_class.oid, pg_class.relname, indisunique, indisprimary, indisexclusion, indkey, pg_get_indexdef(indexrelid, 0, TRUE) AS definition, ARRAY ( SELECT pg_get_indexdef(indexrelid, attnum, TRUE) FROM pg_attribute WHERE attrelid = indexrelid ORDER BY attnum) AS expressions, obj_description(pg_class.oid, 'pg_class') AS COMMENT, indoption, ARRAY ( SELECT pg_collation.collname FROM unnest(indcollation) AS t (colid) LEFT JOIN pg_collation ON pg_collation.oid = colid) AS collations, ARRAY ( SELECT pg_opclass.opcname FROM generate_series(0, indnatts - 1) AS t (i) LEFT JOIN pg_opclass ON pg_opclass.oid = indclass [ i ]) AS opclasses, pg_get_expr(indpred, indrelid, TRUE), amname FROM pg_index LEFT JOIN pg_class ON pg_class.oid = indexrelid LEFT JOIN pg_am ON pg_class.relam = pg_am.oid WHERE indrelid = '"public"."test"'::regclass ORDER BY pg_class.oid;
We probably need to find a different way to write that query.
I've now changed Postico to query
I've run our test suite against CockroachDB 2.0.0 and 2.1.0-rc.1. Everything looks good now.
(I see that the
Please try this build: postico-3700.zip
referenced this issue
Oct 29, 2018
SELECT '\' LIKE '%\\', '\' LIKE '\\%', '\' LIKE '%\\%';
CRDB 2.0 returns:
CRDB 2.1 returns:
A similar query is executed as part of the Postico Table Filter test suite, so those tests always failed on CockroachDB. I'm happy that we have one less failing test case now :)