CREATE TRIGGER delete_g BEFORE DELETE 
ON geofences FOR EACH ROW 
EXECUTE PROCEDURE delete_g();



CREATE TRIGGER insert_newg AFTER INSERT 
ON geofences FOR EACH ROW 
EXECUTE PROCEDURE insert_newg();



CREATE TRIGGER update_g_data_capture_prohibition
BEFORE UPDATE OF data_capture_prohibition ON geofences 
FOR EACH ROW 
EXECUTE PROCEDURE update_g_data_capture_prohibition();

CREATE TRIGGER update_g_active
BEFORE UPDATE OF active ON geofences 
FOR EACH ROW 
EXECUTE PROCEDURE update_g_active();

CREATE TRIGGER update_g_code_zone_type
AFTER UPDATE OF code_zone_type ON geofences 
FOR EACH ROW 
EXECUTE PROCEDURE update_g_code_zone_type();



CREATE TRIGGER update_g_code_zone_reason
AFTER UPDATE OF code_zone_reason ON geofences 
FOR EACH ROW 
EXECUTE PROCEDURE update_g_code_zone_reason();



CREATE TRIGGER update_g_code_uspace
AFTER UPDATE OF code_uspace_class_type ON geofences 
FOR EACH ROW 
EXECUTE PROCEDURE update_g_code_uspace();



CREATE TRIGGER update_g_authorityfrom
BEFORE UPDATE OF authorityfrom ON geofences 
FOR EACH ROW 
EXECUTE PROCEDURE update_g_authorityfrom();



CREATE TRIGGER update_g_notificationto
BEFORE UPDATE OF notificationto ON geofences 
FOR EACH ROW 
EXECUTE PROCEDURE update_g_notificationto();



CREATE TRIGGER update_g AFTER UPDATE
ON geofences FOR EACH ROW 
EXECUTE PROCEDURE update_g();


CREATE TRIGGER update_g_volume_limitation
AFTER UPDATE OF volume_limitations ON geofences 
FOR EACH ROW 
EXECUTE PROCEDURE update_g_volume_limitation();



CREATE TRIGGER update_g_uv_reference
BEFORE UPDATE OF upper_vertical_reference ON geofences 
FOR EACH ROW 
EXECUTE PROCEDURE update_g_uv_reference();



CREATE TRIGGER update_g_lv_reference
BEFORE UPDATE OF lower_vertical_reference ON geofences 
FOR EACH ROW 
EXECUTE PROCEDURE update_g_lv_reference();



CREATE TRIGGER update_g_time_period
AFTER UPDATE OF time_period ON geofences 
FOR EACH ROW 
EXECUTE PROCEDURE update_g_time_period();



CREATE TRIGGER update_g_restriction
AFTER UPDATE OF restriction ON geofences 
FOR EACH ROW 
EXECUTE PROCEDURE update_g_restriction();



CREATE TRIGGER update_g_name_feature
BEFORE UPDATE OF name_feature ON geofences 
FOR EACH ROW 
EXECUTE PROCEDURE update_g_name_feature();



CREATE TRIGGER update_g_metadata
AFTER UPDATE OF author_metadata, creation_datetime ON geofences 
FOR EACH ROW 
EXECUTE PROCEDURE update_g_metadata();



CREATE TRIGGER update_g_message
BEFORE UPDATE OF message ON geofences 
FOR EACH ROW 
EXECUTE PROCEDURE update_g_message();



CREATE TRIGGER update_g_lower_limit
BEFORE UPDATE OF lower_limit ON geofences 
FOR EACH ROW 
EXECUTE PROCEDURE update_g_lower_limit();


CREATE TRIGGER update_g_upper_limit
BEFORE UPDATE OF upper_limit ON geofences 
FOR EACH ROW 
EXECUTE PROCEDURE update_g_upper_limit();


CREATE TRIGGER update_g_layer_name 
BEFORE UPDATE OF layer_name ON geofences 
FOR EACH ROW 
EXECUTE PROCEDURE update_g_layer_name();


CREATE TRIGGER update_g_geom_rc
BEFORE UPDATE OF geom_buffer, geom_center, geom_radius ON geofences 
FOR EACH ROW 
EXECUTE PROCEDURE update_g_geom_rc();

CREATE TRIGGER geometryinsert
BEFORE INSERT 
ON geofences FOR EACH ROW  
EXECUTE PROCEDURE geometryinsert();



CREATE TRIGGER update_g_geom_buffer
BEFORE UPDATE OF geom_buffer ON geofences 
FOR EACH ROW 
EXECUTE PROCEDURE update_g_geom_buffer();


CREATE TRIGGER update_g_intervalbefore
BEFORE UPDATE OF intervalbefore ON geofences 
FOR EACH ROW 
EXECUTE PROCEDURE update_g_intervalbefore();

CREATE TRIGGER update_g_country
BEFORE UPDATE OF country_id ON geofences 
FOR EACH ROW 
EXECUTE PROCEDURE update_g_country();

CREATE TRIGGER update_g_region
BEFORE UPDATE OF region ON geofences 
FOR EACH ROW 
EXECUTE PROCEDURE update_g_region();

	
CREATE TRIGGER update_g_identifier
BEFORE UPDATE OF identifier ON geofences 
FOR EACH ROW 
EXECUTE PROCEDURE update_g_identifier();


CREATE TRIGGER update_g_featureprop
BEFORE UPDATE OF contact, url, oid ON geofences 
FOR EACH ROW 
EXECUTE PROCEDURE update_g_featureprop();

CREATE TRIGGER update_g_checkboxs
BEFORE UPDATE OF remote_id, geoawareness_required ON geofences 
FOR EACH ROW 
EXECUTE PROCEDURE update_g_checkboxs();
			
CREATE TRIGGER update_e_metadata
AFTER UPDATE ON metadata 
FOR EACH ROW 
EXECUTE PROCEDURE update_e_metadata();		
	
					
	