Task: SQL variability: GIST exclusion constraint
This page documents a task in the Codegen SQL variability for hypertable, bi-temporal and GIST patterns; model ores.marketdata entities story. It captures the goal, current status, acceptance, and any notes or results.
Goal
Temporal catalog entities (market_series) can declare GIST exclusion in their .org model and get the correct DDL generated, superseding the standard partial unique index.
Status
| Field | Value |
|---|---|
| State | DONE |
| Parent story | Codegen SQL variability for hypertable, bi-temporal and GIST patterns; model ores.marketdata entities |
| Now | Nothing. |
| Waiting on | Nothing. |
| Next | Nothing. |
| Last touched | 2026-06-30 |
Acceptance
- market_series model sets #+gist_exclusion: true and regenerated SQL includes EXCLUDE USING gist(…) byte-identical to the hand-written file.
Plan
(Implementation strategy. Written when work starts; key decisions
are distilled into the parent story's * Decisions at close, but the
plan itself stays — it is the historical record of what we did.)
Notes
PRs
| PR | Title |
|---|---|
Review
| Comment summary | File | Decision | Notes |
|---|---|---|---|
Result
Implemented in commit 4f587b1ab alongside tasks A5C7C26B and 6365026F. All three SQL variability flags (hypertable, bitemporal_trigger, has_gist_exclusion) were co-delivered in a single template pass. Zero diff on existing domain_entity entities verified.