News for hackers. Stuff that matters.
Re:Implementing State Machines in PostgreSQL by cryptonector on Monday July 31, 2017 @04:48PM (#14895764)
Well, this is what the SQL standard is for: to reduce the amount of work to be done in migrating between databases.

That said, I much prefer to put all this logic into SQL, and to use PostgreSQL, than the alternatives. There's any number of reasons for this:

- direct access to the DB is not dangerous if the logic needed to keep it consistent... is in the DB

- you don't have to replicate this logic if you add new front-ends

- SQL is very expressive, so you'll end up having less code using SQL than anything else -- this also means that RDBMS migration costs need not be as high as one might think, since there will be less SQL than the equivalent for the front-end

- updating business logic is easier to do atomically

Re:Implementing State Machines in PostgreSQL by felixge on Monday July 31, 2017 @05:08PM (#14895907)
Yeah, the idea of having a SQL standard is great. But in practice a "standard" is somewhat meaningless without rigorous compliance testing, and unfortunately SQL hasn't had this for 20 years [1]. But I'll take SQL over any of poor reinvention of relational algebra any day, so it's still better than the alternatives by far :).

[1] http://www.techrepublic.com/article/is-sql-a-standard-anymor...