But nowhere to be found is the concept of prepared statements that would gracefully help then write nicer code. https://www.postgresql.org/docs/current/sql-prepare.html
And that is a lightweight in-code solution for those who are repelled by database procedures which is yet another way to solve theirs issue with SQL.