fix the error if a tuple to be updated or deleted has already been updated or deleted by a BEFORE trigger
changed cms function to match old version of the where clause
Merge branch 'upgrade_postgres_to_9.3' into develop