tww
.tww_app
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
ft_vw_infiltration_installation_insert()
Parameters
Name
Type
Mode
IN
Definition
BEGIN INSERT INTO tww_od.wastewater_structure ( obj_id , _bottom_label , _cover_label , _depth , _input_label , _label , _output_label , accessibility , condition_score , contract_section , detail_geometry3d_geometry , elevation_determination , financing , fk_dataowner , fk_main_cover , fk_main_wastewater_node , fk_operator , fk_owner , fk_provider , gross_costs , identifier , inspection_interval , last_modification , location_name , records , remark , renovation_necessity , replacement_value , rv_base_year , rv_construction_type , status , status_survey_year , structure_condition , subsidies , urgency_figure , year_of_construction , year_of_replacement ) VALUES ( COALESCE( NEW.obj_id, tww_app.generate_oid('tww_od'::text, 'infiltration_installation'::text) ) , NEW._bottom_label , NEW._cover_label , NEW._depth , NEW._input_label , NEW._label , NEW._output_label , NEW.accessibility , NEW.condition_score , NEW.contract_section , NEW.detail_geometry3d_geometry , NEW.elevation_determination , NEW.financing , NEW.fk_dataowner , NEW.fk_main_cover , NEW.fk_main_wastewater_node , NEW.fk_operator , NEW.fk_owner , NEW.fk_provider , NEW.gross_costs , 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, 'infiltration_installation'::text) ) END , NEW.inspection_interval , NEW.last_modification , NEW.location_name , NEW.records , NEW.remark , NEW.renovation_necessity , NEW.replacement_value , NEW.rv_base_year , NEW.rv_construction_type , NEW.status , NEW.status_survey_year , NEW.structure_condition , NEW.subsidies , NEW.urgency_figure , NEW.year_of_construction , NEW.year_of_replacement ) RETURNING obj_id INTO NEW.obj_id; INSERT INTO tww_od.infiltration_installation ( obj_id , absorption_capacity , defects , dimension1 , dimension2 , distance_to_aquifer , effective_area , emergency_overflow , filling_material , fk_dss15_aquifer , kind , labeling , seepage_utilization , upper_elevation , vehicle_access , watertightness ) VALUES ( NEW.obj_id , NEW.absorption_capacity , NEW.defects , NEW.dimension1 , NEW.dimension2 , NEW.distance_to_aquifer , NEW.effective_area , NEW.emergency_overflow , NEW.filling_material , NEW.fk_dss15_aquifer , NEW.kind , NEW.labeling , NEW.seepage_utilization , NEW.upper_elevation , NEW.vehicle_access , NEW.watertightness ); RETURN NEW; END;