Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions context/goals/v1.data.extensions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# goal · v1.data.extensions

- **State:** idle
- **Task:** none
- **Branch:** none

## Tasks

1. [ ] extension-stage
2. [ ] sqlint-extensions
3. [ ] pgvector-sql
4. [ ] pgvector-go
5. [ ] principles

## Decisions

- plan: The image is an extension's sole version source: `postgres:19.0-alpine` with each extension
built from source, pgvector pinned by `ARG PGVECTOR_VERSION`. Rejected: pgvector/pgvector's
Debian images, PGDG on Debian, and a version declared in Go.
- plan: Declarations live in `migrate.Options.Extensions` (name, optional removed state, no
version); the stage runs before every set under the migrator's lock, each in its own transaction,
in declared order. Rejected: an application-owned bottom set of up/down migrations.
- plan: The stage reconciles against `pg_available_extensions` with no history table; a mismatch
makes `Verify` unwrap to `ErrPending`; an unavailable version, or an installed one newer than the
image's with no path down, fails before any set runs.
- plan: A removed declaration runs `DROP EXTENSION IF EXISTS x RESTRICT` after the sets; deleting a
declaration never drops; Reset leaves extensions installed.
- plan: Shipped migration sets declare no extensions; only the application does.
- plan: sqlint's `extensions` key; a listed module exports forms, or `forms = []` with a `reason`,
or is refused. No sqlint check against `Options.Extensions`.
- plan: Module paths `sqlate/postgres/pgvector` and `go-database/postgres/pgvector`; the latter uses
pgvector-go's root module over `database/sql` and depends on the former's metric table.

## Pending edits

- coordinator · `references.md`: add the new sub-modules to sqlate's and go-database's entries, and
pgvector and pgvector-go under upstream sources.
- coordinator · `context/postgres-extensions.md`: delete it once `principles` promotes it, and
remove its `context/README.md` entry and the pointers in `data-intelligence.md` and
`migration-sets.md`.