tww
.tww_app
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
ft_vw_manhole_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, 'manhole'::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, 'manhole'::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.manhole ( obj_id , _orientation , amphibian_exit , dimension1 , dimension2 , function , material , possibility_intervention , surface_inflow ) VALUES ( NEW.obj_id , NEW._orientation , NEW.amphibian_exit , NEW.dimension1 , NEW.dimension2 , NEW.function , NEW.material , NEW.possibility_intervention , NEW.surface_inflow ); RETURN NEW; END;