|
1 | 1 | # Coverage plan: silent schema loss, RLS, and PostgreSQL 18 |
2 | 2 |
|
3 | | -Status: Phases 0 to 5 complete. Phases 6-8 proposed. |
| 3 | +Status: Phases 0 to 5 complete, and Phase 6 items 1 to 3. The rest of |
| 4 | +Phase 6, and Phases 7 and 8, proposed. |
4 | 5 | Written 2026-09-21. |
5 | 6 |
|
6 | 7 | Every claim below was verified against PostgreSQL 18.4 (the version |
@@ -547,7 +548,37 @@ enabled state. |
547 | 548 | → verify: pull a database containing all seven; `remaining.yaml` is |
548 | 549 | absent, and `just round-trip` passes with them in `fixtures/schema.sql`. |
549 | 550 |
|
550 | | -### Phase 6 — New object models (~4 days, ranked) |
| 551 | +### Phase 6 — New object models (~4 days, ranked) — items 1 to 3 **DONE** |
| 552 | + |
| 553 | +**Done:** `EXCLUDE` constraints (item 1), `REPLICA IDENTITY` (item 2) |
| 554 | +and default privileges (item 3), each pulled, built, deployed and in |
| 555 | +`fixtures/schema.sql`. The coverage gate list is down from 5 entries |
| 556 | +to 4. Items 4 to 7 are still open. |
| 557 | + |
| 558 | +Where the work departs from the items below: |
| 559 | + |
| 560 | +- **An unmatched comment now fails the pull.** Pull logged a warning |
| 561 | + for a comment it could not attach and dropped it, which the |
| 562 | + governing invariant forbids. It now keeps the entry in |
| 563 | + `remaining.yaml`. The model has a comment for an exclusion |
| 564 | + constraint only, so a comment on a primary key, unique, check or |
| 565 | + foreign key constraint now fails the pull, and the coverage fixture |
| 566 | + records that gap. |
| 567 | +- **Default privileges are a new top-level object type**, |
| 568 | + `default_privileges/<role>.yaml`, not part of `src/build/acls.rs`: |
| 569 | + they are keyed by the role the defaults are `FOR`, and the role files |
| 570 | + are not written for a pull from `--dump`. Deploy matches them by |
| 571 | + existence, like the Phase 5 types. `REVOKE GRANT OPTION FOR` does not |
| 572 | + parse into the model; pg_dump folds a grant and a revoke of its |
| 573 | + option into a plain grant, so the fixture could not produce one. |
| 574 | +- **`USING INDEX` is written with its index.** pg_dump puts `REPLICA |
| 575 | + IDENTITY USING INDEX` in the index's entry, and build does the same, |
| 576 | + since the index has to exist first. |
| 577 | +- **Deviation 27.** The shared index column renderer now writes |
| 578 | + `COLLATE`, where the Python wrote `COLLATION`, and quotes column |
| 579 | + names. |
| 580 | + |
| 581 | +The original items follow. |
551 | 582 |
|
552 | 583 | Do now, in this order: |
553 | 584 |
|
|
0 commit comments