> The more logic happens near the db, the more surface for errors and edge cases can be reduced and reliability issues avoided. The reduction in distances may also result in improved abstractions and in making the computations efficient in a fundamental thermodynamic way.
Fundamentally this sounds great, but isn't this rather painful with Postgres?
In my DB lectures in Uni I've been informally told to avoid managing logic from within Postgres, as the development and debugging experience for stored procedures is rather poor. I would add to this the painfully slow development cycles for third party language implementations such as plv8. In addition, platform support is next to none, because language extensions cannot load external code due to the trusted nature of the execution environment.