|
|
|
|
|
by ysavir
1148 days ago
|
|
But what problem is moving to triggers solving? Is keeping all your logic in a single place actually a problem, or is moving part of it to Postres tempting because it's nifty? How much training will you have to provide for new hires to be able to run with Postgres triggers instead of just Django logic? |
|
If your application logic needs to remember to update a denormalized column somewhere it's very easy for a bug to slip in in the future when someone adds a new piece of Python code but forgets to update the denormalized column.
With triggers you can eliminate that source of bugs entirely.
This is even more valuable if you have more than one system interacting with a single database.