title: Issues with django and postgresql triggers
body: <p>I have made several tables in a Postgres database in order to acquire data with time values and do automatic calculation in order to have directly compiled values. Everything is done using triggers that will update the right table in case of modification of values.</p>
  
  <p>For example, if I update or insert a value measured @ 2017-11-06 08:00, the trigger will detect this and do the update for daily calculations; another one will do the update for monthly calculations, and so...</p>
  
  <p>Right now, everything is working well. Data acquisition is done in python/Qt to update the measured values using pure SQL instruction (INSERT/UPDATE/DELETE) and automatic calculation are working. 
  Everything is working well too when I use an interface like pgAdmin III to change values.</p>
  
  <p>My problem comes with development in django to display and modify the data. Up to now, I did not have any problem as I just displayed data without trying to modify them. But now I don't understand what's going on...</p>
  
  <p>If I insert a new value using model.save(), eveything is working: the hourly measure is written, the daily, monthly and yearly calculation are done.
  But if I update an existing value, the triggers seem to not see the modification: the hourly measure is updated (so model.save() do the job), but the daily calculation trigger seems not to be launched as the corresponding table is not updated. As said previously, manually updating the same value with pgAdmin III works: the hourly value is updated, the daily calculation is done.</p>
  
  <p>I do not understand why the update process of django seems to disable my triggers...
  I have tried to use the old save algorithm (select_on_save = True), but without success.
  The django account of the database is owning all the tables, triggers and functions. He has execute permission on all triggers and functions. And again, inserting an item with django is working using the same triggers and functions.</p>
  
  <p>My solution for the moment is to use direct SQL instruction with python/Qt to do the job, but I feel a bit frustrating not to be able to use only django API...</p>
  
  <p>Does anybody have some idea to debug or solve this issue?</p>