tww
.tww_app
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
ft_vw_cover_insert()
Parameters
Name
Type
Mode
IN
Definition
BEGIN INSERT INTO tww_od.structure_part ( obj_id , fk_dataowner , fk_provider , fk_wastewater_structure , identifier , last_modification , remark , renovation_demand ) VALUES ( COALESCE( NEW.obj_id, tww_app.generate_oid('tww_od'::text, 'cover'::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, 'cover'::text) ) END , NEW.last_modification , NEW.remark , NEW.renovation_demand ) RETURNING obj_id INTO NEW.obj_id; INSERT INTO tww_od.cover ( obj_id , brand , cover_shape , diameter , fastening , level , material , positional_accuracy , situation3d_geometry , sludge_bucket , venting ) VALUES ( NEW.obj_id , NEW.brand , NEW.cover_shape , NEW.diameter , NEW.fastening , NEW.level , NEW.material , NEW.positional_accuracy , NEW.situation3d_geometry , NEW.sludge_bucket , NEW.venting ); RETURN NEW; END;