tww
.tww_app
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
symbology_on_structure_part_change_networkelement()
Parameters
Name
Type
Mode
IN
Definition
DECLARE _ws_obj_ids TEXT[]; _ws_obj_id TEXT; BEGIN CASE WHEN TG_OP = 'UPDATE' THEN _ws_obj_ids = ARRAY[OLD.fk_wastewater_structure, NEW.fk_wastewater_structure]; WHEN TG_OP = 'INSERT' THEN _ws_obj_ids = ARRAY[NEW.fk_wastewater_structure]; WHEN TG_OP = 'DELETE' THEN _ws_obj_ids = ARRAY[OLD.fk_wastewater_structure]; END CASE; FOREACH _ws_obj_id IN ARRAY _ws_obj_ids LOOP EXECUTE tww_app.update_wastewater_structure_label(_ws_obj_id); END LOOP; RETURN NEW; END;