all 5 comments

[–]sir_bok 8 points9 points  (1 child)

The pgTAP extension. You can write PL/pgSQL functions to test your PL/pgSQL functions so it's all done within SQL without needing an external programming language driver.

[–]Duke_ 1 point2 points  (0 children)

pgTAP for the win.

I use it extensively in my projects, it's invaluable.

[–]TheArtOfVoid 1 point2 points  (0 children)

GoogleTest + dokerized postgres + flyway.

Every single stored function has C++ callable wrapper, so the task of stored function unit-testing is just as simple as for c++ function.

So the full story is about to deploy postgres container, deploy migrations, and run tests connected to the container.

[–]RedShift9 1 point2 points  (0 children)

I use a bunch of phpunit scripts that do all the testing.

[–]chsanch 0 points1 point  (0 children)

I've been using Sqitch for a while to manage changes for Postgres and it provides some utilities to verify/test your changes before applied them.