postgres

package module
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

README

postgres

postgres adapts this backend to the capability interfaces in core/vectorstore.

Install

go get github.com/Tangerg/scope/vectorstores/postgres

Testing

This module integrates a third-party service, so its tests cover what runs without live credentials: config validation, request and response mapping, and error classification. The shared conformance contract is core/vectorstore/storetest — this module runs it rather than copying it.

An integration probe skips unless its credential environment variable is set, so go test ./... is always runnable offline.

Boundaries

This is an independent leaf module: it carries only its own SDK dependency and never imports a sibling provider. The shared contract every module in this family obeys is in ../ARCHITECTURE.md.

See ARCHITECTURE.md for what this module owns.

Documentation

Overview

Package postgres is the module overview for the PostgreSQL-family vector stores. It declares no API of its own; each backend lives in a subpackage.

This one module carries two backends because they share one indivisible stack — the pgwire protocol and pgvector — and therefore one dependency island and one release cadence:

  • pgvector: PostgreSQL with the pgvector extension.
  • cockroachdb: CockroachDB over the same wire.

Both implement the capabilities they genuinely have from core/vectorstore and compile the shared filter Predicate into their own SQL dialect. Their query engine is shared privately through internal/pgstore, so neither backend exposes the other's types.

Schema initialization is an explicit switch: on, it creates tables and indexes; off, it assumes the schema is provisioned. A store never silently alters a backend schema. Every configurable identifier — schema, table, index, metadata column — passes SQL identifier validation at construction, because those names reach the query text directly and that is the injection trust boundary.

See README.md for usage and ARCHITECTURE.md for the contract both backends obey.

Directories

Path Synopsis
Package cockroachdb provides a native CockroachDB vector-store adapter over pgwire.
Package cockroachdb provides a native CockroachDB vector-store adapter over pgwire.
internal
pgstore
Package pgstore implements the shared pgwire execution semantics used by PostgreSQL/pgvector and CockroachDB.
Package pgstore implements the shared pgwire execution semantics used by PostgreSQL/pgvector and CockroachDB.
Package pgvector implements vector-store capabilities with the pgvector PostgreSQL extension.
Package pgvector implements vector-store capabilities with the pgvector PostgreSQL extension.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL