tww
.tww_app
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
ft_vw_param_ca_mouse1_insert()
Parameters
Name
Type
Mode
IN
Definition
BEGIN INSERT INTO tww_od.surface_runoff_parameters ( obj_id , evaporation_loss , fk_catchment_area , fk_dataowner , fk_provider , identifier , infiltration_loss , last_modification , remark , surface_storage , wetting_loss ) VALUES ( COALESCE( NEW.obj_id, tww_app.generate_oid('tww_od'::text, 'param_ca_mouse1'::text) ) , NEW.evaporation_loss , NEW.fk_catchment_area , NEW.fk_dataowner , NEW.fk_provider , CASE WHEN NEW.identifier IS NOT NULL AND NEW.identifier::text <> '' THEN NEW.identifier ELSE COALESCE( NEW.obj_id, tww_app.generate_oid('tww_od'::text, 'param_ca_mouse1'::text) ) END , NEW.infiltration_loss , NEW.last_modification , NEW.remark , NEW.surface_storage , NEW.wetting_loss ) RETURNING obj_id INTO NEW.obj_id; INSERT INTO tww_od.param_ca_mouse1 ( obj_id , dry_wheather_flow , flow_path_length , flow_path_slope , population_equivalent , surface_ca_mouse , usage ) VALUES ( NEW.obj_id , NEW.dry_wheather_flow , NEW.flow_path_length , NEW.flow_path_slope , NEW.population_equivalent , NEW.surface_ca_mouse , NEW.usage ); RETURN NEW; END;