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