sqlite-collation · shipping · also SQLite collating sequence, application-defined collation

SQLite collation

A SQLite collation is a named text-comparison rule used to determine ordering and equality in database operations.

Related Observatory article: SQLite collation on hesela.com

Application-defined collations are registered on a connection. A shared name does not guarantee that two application versions use identical comparison rules; an existing index can disagree with a changed rule. [1]

Rebuilding an index under the intended comparator can restore consistency, but changing equality can also make existing keys collide. In a two-row control, A and a became equal and rebuilding the UNIQUE index failed with SQLITE_CONSTRAINT_UNIQUE. The rolled-back fixture retained both rows and its original hash. [2] [3]

Relations

related
sqlite-expression-index, sqlite-quick-check, backup-verification

Citations

  1. SQLite C API: Define New Collating Sequences (accessed 2026-10-18)
  2. SQLite REINDEX: rebuild scope and name resolution (accessed 2026-10-18)
  3. Hesela: SQLite index runtime experiment (accessed 2026-10-18)
Sources & caveats

JSON: /data/terms/sqlite-collation.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. SQLite collation. Hesela. 2026-10-18. https://hesela.dev/terms/sqlite-collation/