Comment by ako
I would expect most drivers to support (anonymous) stored procedures so you can batch/pipeline multiple queries into one statement to be executed by the database. Probably more a problem of developers not knowing how to use databases properly, not so much a limitation of technology.
You don’t even need driver support, you can use https://www.postgresql.org/docs/current/sql-do.html