Skip to content

Add 'export postgres' subcommand and refactor 'export' into subcommands#6

Open
stchris wants to merge 9 commits intomainfrom
claude/add-postgres-export-wTPaZ
Open

Add 'export postgres' subcommand and refactor 'export' into subcommands#6
stchris wants to merge 9 commits intomainfrom
claude/add-postgres-export-wTPaZ

Conversation

@stchris
Copy link
Copy Markdown
Owner

@stchris stchris commented Mar 30, 2026

  • Rename export to export sqlite (same behaviour, new invocation)
  • Add export postgres --connection <url> to export a PST to PostgreSQL
  • Add postgres = "0.19" dependency (synchronous client)
  • Add docker-compose.yml for spinning up a test Postgres instance
  • Add four #[ignore] integration tests for the Postgres export path,
    runnable with cargo test -- --ignored after docker compose up -d

https://claude.ai/code/session_01EcKP7kwECNc69rSykbQ9Se

claude added 9 commits March 30, 2026 12:24
- Rename `export` to `export sqlite` (same behaviour, new invocation)
- Add `export postgres --connection <url>` to export a PST to PostgreSQL
- Add `postgres = "0.19"` dependency (synchronous client)
- Add `docker-compose.yml` for spinning up a test Postgres instance
- Add four #[ignore] integration tests for the Postgres export path,
  runnable with `cargo test -- --ignored` after `docker compose up -d`

https://claude.ai/code/session_01EcKP7kwECNc69rSykbQ9Se
Add a postgres 16 service container to the CI job and run the
previously-ignored tests with `cargo test -- --ignored`.
The connection string matches docker-compose.yml (port 5433).

https://claude.ai/code/session_01EcKP7kwECNc69rSykbQ9Se
The ubuntu-slim runner has no Docker daemon so service containers
fail. Start the pre-installed system PostgreSQL instead and create
the test role/database with psql directly.

https://claude.ai/code/session_01EcKP7kwECNc69rSykbQ9Se
ubuntu-slim has no pre-installed postgres and no systemd.
Install it with apt and start the cluster using pg_ctlcluster,
which works in chroot/container environments.

https://claude.ai/code/session_01EcKP7kwECNc69rSykbQ9Se
ubuntu-latest has Docker available so service containers work.
Reverts the pg_ctlcluster workaround in favour of the cleaner
service container approach.

https://claude.ai/code/session_01EcKP7kwECNc69rSykbQ9Se
Parallel tests race to CREATE TABLE the same names, causing a
duplicate type error in pg_catalog. --test-threads=1 ensures they
run sequentially and each test's drop+create cycle completes
without interference.

https://claude.ai/code/session_01EcKP7kwECNc69rSykbQ9Se
Table creation is now opt-in. Pass --create-tables to CREATE the
schema before exporting; omit it to export into an existing schema.

https://claude.ai/code/session_01EcKP7kwECNc69rSykbQ9Se
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants