IF (TG_OP = 'DELETE') THEN PERFORM pg_notify( 'thing_notify', TG_OP ||';'|| OLD.type ||';'|| OLD.id ||';'|| OLD.modified ); RETURN OLD;