tww
.tww_app
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
ft_vw_fountain_insert()
Parameters
Name
Type
Mode
IN
Definition
BEGIN INSERT INTO tww_od.connection_object ( obj_id , fk_dataowner , fk_provider , fk_wastewater_networkelement , identifier , last_modification , remark , sewer_infiltration_water_production ) VALUES ( COALESCE( NEW.obj_id, tww_app.generate_oid('tww_od'::text, 'fountain'::text) ) , NEW.fk_dataowner , NEW.fk_provider , NEW.fk_wastewater_networkelement , 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, 'fountain'::text) ) END , NEW.last_modification , NEW.remark , NEW.sewer_infiltration_water_production ) RETURNING obj_id INTO NEW.obj_id; INSERT INTO tww_od.fountain ( obj_id , location_name , situation_geometry ) VALUES ( NEW.obj_id , NEW.location_name , NEW.situation_geometry ); RETURN NEW; END;