One API contract, evidence per provider.
Trestle ships one external API contract with evidence per provider. SQLite and PostgreSQL are first-class database options. PostgreSQL 16, 17 and 18 are supported.
| Capability | SQLite | PostgreSQL |
|---|---|---|
| Configuration and connection test | Available | Available |
| Fresh system schema | Available | Available |
| Collections and physical schema | Available | Available (PG05) |
| Records, batches and optimistic concurrency | Available | Available (PG06) |
| Querying and pagination | Available | Available (PG07) |
| Identity, sessions and tokens | Available | Available (PG04) |
| Access rules and file metadata | Available | Available (PG08) |
| Events and automation | Available | Available (PG09) |
| Backups and restore | Available | Available (PG10) |
| Cross-provider migration | Not applicable | Available (PG11) |
What parity means
Trestle tests observable HTTP behavior rather than pretending the engines are internally identical. Errors, ordering, null handling, uniqueness, timestamps, JSON, optimistic versions, atomic batches, events and jobs form the frozen parity corpus.
Evidence and supported versions
PG03 validates and persists a PostgreSQL connection and initializes all 13 logical system migrations; the PG03R repair made migration history authoritative and enforced the connection timeout. PG04 added identity parity, PG05 collection schema parity and PG06 record parity. PG07 added querying and pagination parity: null, number, datetime and case semantics, typed filter errors, sort direction and filter+cursor pagination behave identically on SQLite and PostgreSQL. PG08-PG10 added access-rule, file, events, jobs and backup/restore parity. PG11 added offline cross-provider migration in both directions. The CI matrix runs the provider-dependent normal and race suites against PostgreSQL 16, 17 and 18; local evidence exercises PostgreSQL 18.6. Availability means one external API contract, not identical internals: see PostgreSQL configuration and Backup and restore for provider-specific operational guidance.
Choose SQLite when you want an embedded database with no separate service. Choose PostgreSQL when you want an external database, TLS, connection pooling and server tooling. See the provider-specific guidance in PostgreSQL configuration, Backup and restore, and Migrations.