Summary
Ship a first-party PostgreSQL adapter for the Store SPI introduced in #422, so users who need a non-SQLite local store have a maintained option out of the box.
- Python:
cq-sdk[postgres] extra pulling psycopg, exposing cq.stores.postgres.PostgresStore.
- Go: separate module
github.com/mozilla-ai/cq/sdk/go/stores/postgres with its own go.mod so the driver dependency stays off the core SDK.
Both adapters implement the Store interface/protocol identically to the SQLite default (domain-tag matching, shared ranker, matching error semantics) and pass the existing conformance test kit (storetest / tests/conformance.py).
Full-text search (tsvector + GIN) is a decision point: ship domain-match-only first (simplest, the SPI degrades gracefully), or include full-text at launch. To be decided during implementation.
Context
Summary
Ship a first-party PostgreSQL adapter for the
StoreSPI introduced in #422, so users who need a non-SQLite local store have a maintained option out of the box.cq-sdk[postgres]extra pullingpsycopg, exposingcq.stores.postgres.PostgresStore.github.com/mozilla-ai/cq/sdk/go/stores/postgreswith its owngo.modso the driver dependency stays off the core SDK.Both adapters implement the
Storeinterface/protocol identically to the SQLite default (domain-tag matching, shared ranker, matching error semantics) and pass the existing conformance test kit (storetest/tests/conformance.py).Full-text search (
tsvector+ GIN) is a decision point: ship domain-match-only first (simplest, the SPI degrades gracefully), or include full-text at launch. To be decided during implementation.Context
StoreFromURL/create_storealready dispatchpostgresql://URLs with a clear error naming the adapter to install.postgresql+psycopgURL handling #311, ImplementPostgresStoreagainstStoreprotocol #312 (separate scope; server uses SQLAlchemy, SDKs do not).