DROP TRIGGER trigger_update_vod ON api.segments; -- switch from `AFTER UPDATE` to `BEFORE UPDATE` CREATE TRIGGER trigger_update_vod BEFORE UPDATE ON api.segments FOR EACH ROW EXECUTE FUNCTION tg__update_vod_updated_at();