tmppg locally spawns a new PostgreSQL database cluster for you to create databases in, mostly for tests. Since initializing a database cluster is relatively expensive, it can be done in a wrapper program: go run github.com/authenticvision/tmppg/cmd/wrapper@latest -- go test ./...
tmppg is a reimplementation of github.com/stapelberg/postgrestest with different opinions:
- Run
postgresdirectly instead of viapg_ctl - Pass config to
postgresvia CLI arguments instead of using a config file - No Windows support
- An effectively worse startup check
- Use
pgxinstead ofdatabase/sql