|
|
|
|
|
by CuriouslyC
1269 days ago
|
|
Most of the edge cases can be handled using stored procedures on the database, which can be called in PostgREST using a generic '/rpc/<name>' endpoint. You can use foreign data wrappers to handle almost all the remaining edge cases, though that has diminishing returns in terms of time savings vs having a separate service as cases increase in complexity. |
|
This is what actually turned my off about it when I used it for a small hobby project: the tooling around programming in SQL is absolute crap.
Expressing business logic in stored procedures is great in theory, but in practice only the very simplest business logic will be written as stored procedures, because anything non-trivial is impossible to debug, impossible to log properly and there is never a call-stack available when the inevitable runtime error/exception occurs.
If the tooling for writing, debugging, deploying and testing stored procedures were up to the level of what Turbo Pascal was in the 80s, I'd do it in a heartbeat.
As things stand, the only way to figure out bugs in the system is to visually inspect the stored procedure source code.