Suppose I register a custom collation my_collation which, for example, orders digit strings as integers. Then I create and populate a table foo with a primary key on the column bar using this collation:
CREATE TABLE foo(
bar TEXT PRIMARY KEY COLLATE my_collation,
quux INT
);
INSERT INTO foo VALUES ('1000', 1000), ('1', 1), ('123', 123), ('12', 12);
When I subsequently open this database in an environment that does not have this custom collation registered (e.g. sqlite3 CLI shell) I'm unable to query this table:
sqlite> SELECT * FROM foo;
Parse error: no query solution
Obviously I don't expect to be able to INSERT/DELETE, UPDATE the bar column or even to SELECT with constraints on bar, e.g.
SELECT * FROM foo
WHERE bar = '12';
since all these require comparing bar values via the unavailable collation. But I don't understand why I can't just SELECT the entire table.
Why can't I, and how do I get the data out?