docs: section 5.1 states every partition key column is TEXT COLLATE "C", and tables created before v0.1.13 keep the database collation on pk

Open Beginner friendly
#1,412 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
78/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
markdown, postgresql, rust

Research direction

The sentence to change is in docs/design/04-component-storage.md, section 5.1, line 390. Read the 'Sort key storage' bullet right below it and TEXT_KEY in crates/storage-postgres/src/data/ddl.rs to match the qualification wording. Done when the partition key sentence says that only tables created from v0.1.13 on carry COLLATE "C" on pk, and points to technical debt C-11.

Written by the indexing model from the issue text.

Description

docs/design/04-component-storage.md, section 5.1, "Partition key storage" (line 390 on main at 44cd43667): "Partition key values are always stored as TEXT COLLATE "C"."

Tables created before v0.1.13 keep the database collation on pk, as on every other text key column (technical debt C-11 in docs/technical-debt.md, and #641 for the migration). TEXT_KEY in crates/storage-postgres/src/data/ddl.rs says so in its comment: tables created before the constant existed keep the database collation on these columns.

The next bullet of the same section, "Sort key storage", already states that qualification for the sort key columns. The builders put COLLATE "C" on every string key predicate and ORDER BY. So results are byte-ordered on tables created before the columns carried the collation, and the indexes cannot serve the predicates there.

Proposed change: qualify the partition key sentence the same way. For example: "Partition key values are stored as TEXT COLLATE "C" on tables created from v0.1.13 on. Older tables keep the database collation on pk (technical debt C-11)."

Dominant language
Rust
Stars
517
Forks
60
Avg merge
3d 21h
Merged PRs (30d)
116

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ExtendDB/extenddb

All issues in ExtendDB/extenddb

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.