Postgresql Update Trigger Function Example