Repository navigation
Description
2026-11-12, name claims are #96 (PR #97): the planner asks every contributor and the dialect what names the target takes, and a name taken twice is one SchemaDiagnostic.NameCollision (SK1001) in a SchemaValidationException that holds all of them. PostgreSQL's namespaces are held against the server on 16 and 18. Still open here: Sql.Raw<T> in an element (#26) and a factory for PgExclusion.SpGist, the compile probes against the shipped assemblies, the exact kernel pin (#35).
2026-11-12, the 5.x reader is #92 (PR #94): the PostgreSQL package reads CustomExclusion:Constraints through a new seam of the kernel (LegacyDeclarationReader<T>). A snapshot scaffolded by the published 5.6.0 diffs to nothing against the same model declared with SchemaKit, and the database its migration builds has the catalog EnsureCreated() builds, on PostgreSQL 16 and 18. That is the last "done when" below. Refused, not dropped: equality-only constraints, access methods other than GiST and one-element SP-GiST, a constraint on a TPC root (#43). The stored form of Pg.Exclusion needed no change for it. Still open after #92: name claims (#44), Sql.Raw<T> in an element (#26) and a factory for SpGist, the compile probes, the exact kernel pin (#35). Found on the way: #93.
Decided 2026-11-12 by the maintainer, on the decisions PRs #77 and #79 listed as unconfirmed:
- Features ship without the experimental mark. What a consumer calls to declare, read and amend objects carries no
SK9001. Done in PgExclusion, third slice: the read model and Redeclare without the experimental mark #90 (PR feat: the read model and Redeclare carry no experimental mark, and Declare carries its own #91): the read model's class is unmarked andDeclarecarries the mark itself. EnsureExtensionstays on the dialect. A contributor states the dependency; the planner asks the provider's dialect once per extension and migration.
The other decisions of the two PRs are still unconfirmed. The stored form of Pg.Exclusion is deliberately left open until the 5.x reader (#18) has been written against it.
2026-11-12, later: the second slice is #78 (PR #79, stacked on #77): btree_gist is injected where an element needs it, once per migration and first; SuppressBtreeGistInjection() and a model's own HasPostgresExtension switch it off. Green on PostgreSQL 16 and 18 locally.
2026-11-12: cut into slices. The first is #76 (PR #77): the PostgreSQL package, UseSchemaKit() on Npgsql's builder, the dialect that counts bytes, PgExclusion with the staged chain and DeclarePostgres, and the contributor with its rename in place and its measured ImpactOf. Green on PostgreSQL 16 and 18 locally: every runtime path sees the constraint, overlapping rows are refused, rows outside the filter are not.
Still open here after #76:
- Name claims across kinds (Validation and diagnostics: name claims across kinds, every finding at once #44). The contributor answers
Claims; nothing asks yet. - The read model and
Redeclarewithout an opt-in.GetDeclarations,FindDeclarationandRedeclarework forPgExclusion, butSchemaDeclarationExtensionsis markedSK9001, so a consumer's convention needs the opt-in. - The 5.x reader for
CustomExclusion:Constraints, and a 5.x model moving with no operations (Spike C: a 5.x snapshot hands over with zero operations #18). Sql.Raw<T>in an element (Lambda translator: the 5.x port with null compensation, templates and the parity sweep #26), and a factory forPgExclusion.SpGist, which today is built by its constructor.- The compile probes (P2,
P3.overlaps-on-text, P6, P8, P9) against the shipped assemblies. - The kernel at exactly the package's version in the packed dependency (Port the convention tests, MigrationHarness, release workflow and skills #35).
Decided 2026-11-12 by the maintainer: the lambda translator (#26) comes before the PostgreSQL package (#25), so that an exclusion constraint in preview.1 takes a lambda filter. The plan had the translator in preview.2. A 5.x consumer that passes its exclusion filters as lambdas could otherwise not try preview.1 without rewriting them as SQL.
From #42, 2026-11-11: the PostgreSQL dialect is this issue's to add. The kernel's SchemaDialect counts an identifier's length in characters. PostgreSQL keeps 63 bytes and shortens a longer name without an error, so a name of 40 two-byte characters passes the generic check and is truncated by the server. The PostgreSQL package registers a dialect that overrides Measure to count UTF-8 bytes, before the kernel's TryAdd. Its statements are written through SchemaSql, and the index or constraint contributor's live test has to hold the qualified drop, as PostgresStatementTests does for the builder.
The feature of preview.1 (#2). Design, sections 5 (P2, P3, P6) and 14.
Change
pg.Equal(…).Overlaps(…) stages, pg.Exclusion(…, where:, deferral:, name:), PgExclusion.Gist | SpGist, the contributor (plain ADD CONSTRAINT, qualified names, Plan with rename in place), btree_gist injection, name claims across kinds, the read model and Redeclare, the 5.x reader for CustomExclusion:Constraints.
Done when
On PostgreSQL 16 and 18: every runtime path sees the constraint; overlapping rows are refused and rows outside the filter are not; a 5.x model with exclusion constraints moves with no operations (#18).
Activity