| ▲ | saxenaabhi 5 hours ago | |
You give no reasons why you think it's a sound advice. My experience is following 1) Tx are faster when they are executed a sql function since you cut down on network roundtrip between statements. Also prevents users from doing fancy shenanigans with network after calling startTransaction. 2) It keeps your business logic separated from your other code that does caching/authorization/etc. 3) Some people say it's hard to test sql functions, but since pglite it's a non issue IMO. 4) Logging is a little worse, but `raise notice` is your friend. > At my new company, the use of stored procedures unchecked has really hurt part of the companies ability to build new features Isn't it just because most engineers aren't as well versed in SQL as they are in other programming languages. | ||