tww
.tww_app
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
ft_vw_tww_damage_delete()
Parameters
Name
Type
Mode
IN
Definition
BEGIN CASE WHEN OLD.damage_type = 'channel'::tww_app.damage_type THEN DELETE FROM tww_od.damage_channel WHERE obj_id = OLD.obj_id; WHEN OLD.damage_type = 'manhole'::tww_app.damage_type THEN DELETE FROM tww_od.damage_manhole WHERE obj_id = OLD.obj_id; END CASE; DELETE FROM tww_od.damage WHERE obj_id = OLD.obj_id; RETURN NULL; END;