tww
.tww_app
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
ft_vw_pump_insert()
Parameters
Name
Type
Mode
IN
Definition
BEGIN INSERT INTO tww_od.overflow ( obj_id , actuation , adjustability , brand , control , discharge_point , fk_control_center , fk_dataowner , fk_overflow_char , fk_overflow_to , fk_provider , fk_wastewater_node , function , gross_costs , identifier , last_modification , qon_dim , remark , signal_transmission , subsidies ) VALUES ( COALESCE( NEW.obj_id, tww_app.generate_oid('tww_od'::text, 'pump'::text) ) , NEW.actuation , NEW.adjustability , NEW.brand , NEW.control , NEW.discharge_point , NEW.fk_control_center , NEW.fk_dataowner , NEW.fk_overflow_char , NEW.fk_overflow_to , NEW.fk_provider , NEW.fk_wastewater_node , NEW.function , NEW.gross_costs , NEW.identifier , NEW.last_modification , NEW.qon_dim , NEW.remark , NEW.signal_transmission , NEW.subsidies ) RETURNING obj_id INTO NEW.obj_id; INSERT INTO tww_od.pump ( obj_id , construction_type , operating_point , placement_of_actuation , placement_of_pump , pump_flow_max_single , pump_flow_min_single , start_level , stop_level ) VALUES ( NEW.obj_id , NEW.construction_type , NEW.operating_point , NEW.placement_of_actuation , NEW.placement_of_pump , NEW.pump_flow_max_single , NEW.pump_flow_min_single , NEW.start_level , NEW.stop_level ); RETURN NEW; END;