Forum OpenACS Q&A: Response to update returns 1, but no changes have been made

I found the problem -- it was with a trigger that that was intercepting the UPDATE so the changes were not actually getting to the database.

This was my first time writing triggers in Postgres so I wasn't sure as to how to do it (see previous post ERROR: control reaches end of trigger procedure without RETURN).

Because I was returning old from the UPDATE, no changes were being made (it takes the old values and puts them into the database rather than your new values).

So making a conditional fixes the problem (only returning old for deletes):

IF TG_OP=''UPDATE'' THEN
  RETURN NEW;
END IF;

RETURN OLD;