Hacker News new | ask | show | jobs
by chasd00 6 days ago
> it prevents devs just writing their own random queries.

which in turn makes every single change in schema or logic dependent on a DBA making the change in Postgres balanced against their lunch schedule. Good for DBA job security but terrible for productivity and sanity.

1 comments

That is entirely a design choice if you make your DBA responsible for that type of thing.

I have all my database functions version controlled and deployed by liquibase on every release (along with any other migrations that need to go out).

They are treated like code like any other piece of code in my codebase, get changed along with the rest of the application as necessary, and are deployed automatically with the rest of my application.

DB functions / stored procedures are the right tool for certain jobs. When they are the right fit, they can save your ass performance wise.