4 ms·
Are you sure about that? You can validate an awful lot in a PostgreSQL constraint, and I often don't bother validating in the app as a result. Validation in t
by Jweb_Guru 13y ago
Are you sure about that? You can validate an awful lot in a PostgreSQL constraint, and I often don't bother validating in the app as a result. Validation in the app can also be extremely difficult to get right in a concurrent environment. There is a high likelihood that many such checks have race conditions that you aren't aware of, if you haven't gone over your application with a dedicated DBA.
- lmm 13y agoYou're right that a lot is possible, particularly if you're willing to write a trigger at which point you have a programming language at your disposal. But it's not a great environment for writing code with logic, in terms of things like tool support, debug support, library ecosystem.