News for hackers. Stuff that matters.
Re:We built our customer data warehouse all on Postgres by aurareturn on Friday February 02, 2024 @03:09AM (#39226332)
Yes but Python is nice to write. Postgres functions are not. At least not to me.
Re:We built our customer data warehouse all on Postgres by maxbond on Friday February 02, 2024 @03:17AM (#39226379)
Depending on what kind of deployment you have, you could use Tcl, Rust, or even Python if you could use untrusted extensions. (Not a comment on this particularly testing framework, but Postgres server-side programming more generally.)

But I hear you, PgSQL can be very annoying and unergonomic, and it's not a language most people you're hiring will know upfront. Pushing things onto the backend isn't unreasonable. When I write tests for PgSQL, I write them in Python and run them from the client side, not on the server.

Re:We built our customer data warehouse all on Postgres by ttfkam on Friday February 02, 2024 @09:13PM (#39236993)
pl/pgSQL is very good (and ergonomic) for a logical extension to SQL, aka set theory programming with intermediate state. It isn't and was never targeted toward general purpose programming like Python.

That said, 100% agree that unit tests should live outside the DB. Querying for sets inside or outside makes no functional difference, and your DB doesn't need all that extra cruft.