4 ms·
Not the author, but PostgreSQL has constraint triggers that can run procedures / functions on insert/update/delete, to allow/reject a given row or statement. Th
by FrancoisBosun 3y ago
Not the author, but PostgreSQL has constraint triggers that can run procedures / functions on insert/update/delete, to allow/reject a given row or statement. That would be one way to confirm that a given update from a client is valid, from the POV of the application.
- koolba 3y agoThe situation I’m considering is data that matches the referential integrity and check constraints of the database, but is malicious. For example syncing a “salary update to $1M” for yourself into the source database.
- thruflo 3y agoYup, this is what's addressed by write permissions. You can express who can set salaries and column level rules to validate input values. When it comes to concurrency problems like not spending money twice, the plan is https://electric-sql.com/blog/2022/05/03/introducing-rich-crdts#reservations https://electric-sql.com/blog/2022/05/03/introducing-rich-cr...
- robertlagrant 3y agoRow-level permissions also very useful - e.g. I am allowed to update my own profile, but not someone else's.