tww
.tww_app
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
ft_vw_wastewater_node_insert()
Parameters
Name
Type
Mode
IN
Definition
BEGIN INSERT INTO tww_od.wastewater_networkelement ( obj_id , fk_dataowner , fk_provider , fk_wastewater_structure , identifier , last_modification , remark ) VALUES ( COALESCE( NEW.obj_id, tww_app.generate_oid('tww_od'::text, 'wastewater_node'::text) ) , NEW.fk_dataowner , NEW.fk_provider , NEW.fk_wastewater_structure , 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, 'wastewater_node'::text) ) END , NEW.last_modification , NEW.remark ) RETURNING obj_id INTO NEW.obj_id; INSERT INTO tww_od.wastewater_node ( obj_id , _function_hierarchic , _status , _usage_current , backflow_level_current , bottom_level , elevation_accuracy , fk_hydr_geometry , function_node_amelioration , situation3d_geometry , wwtp_number ) VALUES ( NEW.obj_id , NEW._function_hierarchic , NEW._status , NEW._usage_current , NEW.backflow_level_current , NEW.bottom_level , NEW.elevation_accuracy , NEW.fk_hydr_geometry , NEW.function_node_amelioration , NEW.situation3d_geometry , NEW.wwtp_number ); RETURN NEW; END;