tww
.tww_app
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
symbology_on_wastewater_node_change()
Parameters
Name
Type
Mode
IN
Definition
DECLARE co_obj_id TEXT; affected_sp RECORD; BEGIN CASE WHEN TG_OP = 'UPDATE' THEN co_obj_id = OLD.obj_id; WHEN TG_OP = 'INSERT' THEN co_obj_id = NEW.obj_id; WHEN TG_OP = 'DELETE' THEN co_obj_id = OLD.obj_id; END CASE; SELECT ne.fk_wastewater_structure INTO affected_sp FROM tww_od.wastewater_networkelement ne WHERE obj_id = co_obj_id; EXECUTE tww_app.update_depth(affected_sp.fk_wastewater_structure); EXECUTE tww_app.update_wastewater_structure_label(affected_sp.fk_wastewater_structure); RETURN NEW; END;