Files
turso/postgres/cli/tests
Pekka Enberg 100efe6bfc Merge 'postgres/cli: auto-attach persisted schemas on startup' from
Auto-attaches persisted PostgreSQL schema sidecar databases during
tursopg startup.
`CREATE SCHEMA` stores non-public schemas as sidecar database files.
This change runs the existing schema auto-attach step before dispatching
to server, one-shot SQL, stdin, or interactive CLI modes, so schema-
qualified queries continue to work after reopening the main database.
Adds a CLI regression test that creates a schema/table in one tursopg
process and reads it back from a second process using the same file-
backed database.
Before this change, sidecar schema files persisted on disk, but the
regular CLI startup path did not reattach them. Reopening the main
database and querying `schema.table` failed with `no such database`
until `CREATE SCHEMA` was run again.
This makes persisted schema behavior consistent across tursopg startup
modes.
I used AI for codebase navigation, debugging guidance, and review of the
implementation approach and tests. The implementation itself was written
and reviewed by me

Reviewed-by: Mikaël Francoeur (@LeMikaelF)

Closes #8084
2026-08-03 12:22:06 +03:00
..