News for hackers. Stuff that matters.
Re:What if we treated Postgres like SQLite? by whartung on Monday September 22, 2025 @11:23AM (#45334732)
I don’t recall the mechanics but I do know that folks have bundled starting a local instance of PG solely for unit tests.

There’s a pre-install step to get PG on the machine, but once there, the testing framework stands it up, and shuts it down. As I recall it was pretty fast.

Re:What if we treated Postgres like SQLite? by nullzzz on Monday September 22, 2025 @12:54PM (#45336185)
This is IMO best done running pg in a container using docker-compose or similar
Re:What if we treated Postgres like SQLite? by majewsky on Monday September 22, 2025 @07:13PM (#45340787)
This is my version of it: https://pkg.go.dev/github.com/sapcc/go-bits/easypg#WithTestD...

The most annoying part of it is that Postgres absolutely detests running as PID 0, which makes running `make check` in Docker containers an unnecessarily frustrating experience. I understand why Postgres rejects PID 0 by default, but I would really like for them to recognize strcmp(getenv("I_AM_IN_DOCKER_AND_I_DONT_CARE"), "true") or something.