Re:New In Postgres 12: Generated Columns
by eternalban on Wednesday October 02, 2019 @05:27AM
(#21134654)
Arguably, a robust RDBMS with user defined functions (such as PostgreSQL) are the ideal place for core domain semantics.
What is missing is a modern tool chain that addresses the painpoints of such a development model.
If it's something that's not application-specific and fits nicely into the query language (like in the example given) it makes sense to have it inside the DB, because for queries involving sorting, limiting, etc. you can do all that stuff inside the DB and return the few values that interest you, instead of transferring all the data and having to write code to do that inside your app.