update_tables_0.4.x-0.5.pgsql
changeset 81 89b71a9abfcf
parent 80 5dedc673524e
equal deleted inserted replaced
80:5dedc673524e 81:89b71a9abfcf
   148 
   148 
   149     RETURN NEW;
   149     RETURN NEW;
   150 END;
   150 END;
   151 $$ LANGUAGE plpgsql STABLE;
   151 $$ LANGUAGE plpgsql STABLE;
   152 
   152 
       
   153 DROP TRIGGER IF EXISTS primary_count ON domain_name;
   153 CREATE TRIGGER primary_count_ins BEFORE INSERT ON domain_name
   154 CREATE TRIGGER primary_count_ins BEFORE INSERT ON domain_name
   154     FOR EACH ROW EXECUTE PROCEDURE domain_primary_trigger();
   155     FOR EACH ROW EXECUTE PROCEDURE domain_primary_trigger();
   155 
   156 
   156 CREATE TRIGGER primary_count_upd AFTER UPDATE ON domain_name
   157 CREATE TRIGGER primary_count_upd AFTER UPDATE ON domain_name
   157     FOR EACH ROW EXECUTE PROCEDURE domain_primary_trigger();
   158     FOR EACH ROW EXECUTE PROCEDURE domain_primary_trigger();