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.
In that light I don't think `PREPARE` and stored procedures would help much (or at all).
I also don't find them hilarious, though they do represent very extreme views on the subject (imho) while to me it is essentially a tradeoff (I use both direct SQL and ORMs, depending on the needs of the project).
And as far as I understand depending on your use case prepared or stored is better.
Prepared mean less code base inside the db and still more composability with less sql injection risks.
Stored add even more composability and security but at the cost of managing code inside the db.
Prepared statements don’t help you here, right? My understanding is that they’re purely for performance as the parser doesn’t need to be rerun each time. You need to recreate them for every dB session.
I might be wrong and I'm always happy to learn new things but give me some arguments instead of downvoting (as i guess it's you).