Routines

Routines

Name Type Language Deterministic Return Type Security Restriction Comments
ft_vw_prank_weir_delete() FUNCTION plpgsql false trigger INVOKER
ft_vw_infiltration_installation_delete() FUNCTION plpgsql false trigger INVOKER
vw_file_update() FUNCTION plpgsql false trigger INVOKER
ft_vw_individual_surface_update() FUNCTION plpgsql false trigger INVOKER
ws_symbology_update_by_reach() FUNCTION plpgsql false trigger INVOKER
set_organisations_active(_undo_existing boolean DEFAULT false) FUNCTION plpgsql false void INVOKER
ft_vw_tww_reach_insert() FUNCTION plpgsql false trigger INVOKER
ft_vw_channel_update() FUNCTION plpgsql false trigger INVOKER
ft_vw_tank_cleaning_delete() FUNCTION plpgsql false trigger INVOKER
ft_vw_backflow_prevention_insert() FUNCTION plpgsql false trigger INVOKER
ft_vw_electromechanical_equipment_insert() FUNCTION plpgsql false trigger INVOKER
ft_vw_special_structure_insert() FUNCTION plpgsql false trigger INVOKER
audit_table(target_table regclass, audit_rows boolean, audit_query_text boolean, ignored_cols text[]) FUNCTION plpgsql false void INVOKER

ADD auditing support TO a TABLE.

Arguments: target_table: TABLE name, schema qualified IF NOT ON search_path audit_rows: Record each row CHANGE, OR only audit at a statement level audit_query_text: Record the text of the client query that triggered the audit event? ignored_cols: COLUMNS TO exclude FROM UPDATE diffs, IGNORE updates that CHANGE only ignored cols.

ft_vw_access_aid_delete() FUNCTION plpgsql false trigger INVOKER
symbology_on_wastewater_structure_update() FUNCTION plpgsql false trigger INVOKER
ft_vw_reservoir_delete() FUNCTION plpgsql false trigger INVOKER
ft_vw_wwtp_structure_update() FUNCTION plpgsql false trigger INVOKER
unaudit_table(target_table regclass) FUNCTION plpgsql false void INVOKER
check_modification_enabled() FUNCTION plpgsql false boolean DEFINER
symbology_update_by_reach_point() FUNCTION plpgsql false trigger INVOKER
ft_vw_tww_infiltration_installation_insert() FUNCTION plpgsql false trigger INVOKER
ft_vw_tww_overflow_update() FUNCTION plpgsql false trigger INVOKER
synchronize_level_with_altitude_on_cover() FUNCTION plpgsql false trigger INVOKER
ft_vw_dryweather_flume_update() FUNCTION plpgsql false trigger INVOKER
ft_vw_solids_retention_delete() FUNCTION plpgsql false trigger INVOKER
ft_vw_bio_ecol_assessment_update() FUNCTION plpgsql false trigger INVOKER
ft_vw_maintenance_update() FUNCTION plpgsql false trigger INVOKER
ft_vw_reservoir_insert() FUNCTION plpgsql false trigger INVOKER
ft_vw_param_ca_mouse1_update() FUNCTION plpgsql false trigger INVOKER
import_manhole_quarantine_delete_entry() FUNCTION plpgsql false trigger INVOKER
ft_vw_electromechanical_equipment_delete() FUNCTION plpgsql false trigger INVOKER
ft_vw_tww_wastewater_structure_update() FUNCTION plpgsql false trigger INVOKER
ft_vw_flushing_nozzle_delete() FUNCTION plpgsql false trigger INVOKER
ft_vw_drainless_toilet_update() FUNCTION plpgsql false trigger INVOKER
import_manhole_quarantine_try_structure_update() FUNCTION plpgsql false trigger INVOKER
ft_vw_building_update() FUNCTION plpgsql false trigger INVOKER
import_manhole_quarantine_try_let_update() FUNCTION plpgsql false trigger INVOKER
ft_vw_small_treatment_plant_update() FUNCTION plpgsql false trigger INVOKER
ft_vw_tank_cleaning_insert() FUNCTION plpgsql false trigger INVOKER
ft_vw_cover_insert() FUNCTION plpgsql false trigger INVOKER
ft_vw_special_structure_delete() FUNCTION plpgsql false trigger INVOKER
ft_vw_wastewater_structure_insert() FUNCTION plpgsql false trigger INVOKER
ft_vw_wastewater_structure_delete() FUNCTION plpgsql false trigger INVOKER
ft_vw_leapingweir_delete() FUNCTION plpgsql false trigger INVOKER
ft_vw_cover_delete() FUNCTION plpgsql false trigger INVOKER
ft_vw_reach_update() FUNCTION plpgsql false trigger INVOKER
ft_vw_leapingweir_insert() FUNCTION plpgsql false trigger INVOKER
ft_unset_default_values() FUNCTION plpgsql false trigger DEFINER
ft_vw_fountain_delete() FUNCTION plpgsql false trigger INVOKER
ft_vw_param_ca_mouse1_delete() FUNCTION plpgsql false trigger INVOKER
ft_vw_pump_update() FUNCTION plpgsql false trigger INVOKER
ft_vw_fountain_insert() FUNCTION plpgsql false trigger INVOKER
update_wn_symbology_by_overflow(_obj_id text, _all boolean DEFAULT false) FUNCTION plpgsql false void INVOKER
ft_vw_building_delete() FUNCTION plpgsql false trigger INVOKER
ft_vw_dryweather_downspout_insert() FUNCTION plpgsql false trigger INVOKER
ft_vw_benching_update() FUNCTION plpgsql false trigger INVOKER
ft_vw_tww_additional_ws_update() FUNCTION plpgsql false trigger INVOKER
ft_vw_bio_ecol_assessment_delete() FUNCTION plpgsql false trigger INVOKER
ft_vw_manhole_delete() FUNCTION plpgsql false trigger INVOKER
ft_vw_leapingweir_update() FUNCTION plpgsql false trigger INVOKER
ft_vw_tww_maintenance_event_update() FUNCTION plpgsql false trigger INVOKER
get_default_values(field_name text) FUNCTION plpgsql false character varying DEFINER
ft_vw_tww_damage_insert() FUNCTION plpgsql false trigger INVOKER
ft_vw_drainless_toilet_delete() FUNCTION plpgsql false trigger INVOKER
symbology_on_reach_change() FUNCTION plpgsql false trigger INVOKER
ft_vw_flushing_nozzle_update() FUNCTION plpgsql false trigger INVOKER
generate_oid_postfix(_schema text, _table_name text) FUNCTION plpgsql false character varying INVOKER
ft_vw_tank_cleaning_update() FUNCTION plpgsql false trigger INVOKER
alter_symbology_triggers(action_name text) FUNCTION plpgsql false void DEFINER
symbology_on_structure_part_change_networkelement() FUNCTION plpgsql false trigger INVOKER
ft_vw_reach_insert() FUNCTION plpgsql false trigger INVOKER
if_modified_func() FUNCTION plpgsql false trigger DEFINER

Track changes TO a TABLE at the statement AND/OR row level.

Optional parameters TO TRIGGER IN CREATE TRIGGER call:

param 0: BOOLEAN, whether TO log the query text. default ‘t’.

param 1: text[], COLUMNS TO IGNORE IN updates. default [].

     Updates TO ignored cols are omitted FROM changed_fields.

     Updates WITH only ignored cols changed are NOT inserted
     INTO the audit log.

     Almost ALL the processing work IS still done for updates
     that ignored. If you need to save the load, you need to use
     WHEN clause on the trigger instead.

     No warning or error is issued if ignored_cols contains columns
     that do not exist in the target table. This lets you specify
     a standard set of ignored columns.

There is no parameter to disable logging of values. Add this trigger as a ‘FOR EACH STATEMENT’ rather than ‘FOR EACH ROW’ trigger if you do not want to log row values.

Note that the user name logged is the login role for the session. The audit trigger cannot obtain the active role because it is reset by the SECURITY DEFINER invocation of the audit trigger its self.

ft_vw_drainage_system_update() FUNCTION plpgsql false trigger INVOKER
ft_vw_wastewater_structure_update() FUNCTION plpgsql false trigger INVOKER
ft_vw_reach_delete() FUNCTION plpgsql false trigger INVOKER
ft_vw_solids_retention_insert() FUNCTION plpgsql false trigger INVOKER
ft_vw_building_insert() FUNCTION plpgsql false trigger INVOKER
ft_vw_dryweather_downspout_delete() FUNCTION plpgsql false trigger INVOKER
ft_vw_prank_weir_insert() FUNCTION plpgsql false trigger INVOKER
ft_vw_backflow_prevention_delete() FUNCTION plpgsql false trigger INVOKER
ft_vw_reservoir_update() FUNCTION plpgsql false trigger INVOKER
unaudit_view(target_view regclass) FUNCTION plpgsql false void INVOKER
ft_vw_manhole_insert() FUNCTION plpgsql false trigger INVOKER
ft_vw_access_aid_insert() FUNCTION plpgsql false trigger INVOKER
ft_set_default_values() FUNCTION plpgsql false trigger DEFINER
ft_vw_maintenance_insert() FUNCTION plpgsql false trigger INVOKER
ft_vw_infiltration_zone_update() FUNCTION plpgsql false trigger INVOKER
ft_vw_small_treatment_plant_insert() FUNCTION plpgsql false trigger INVOKER
ft_vw_drainless_toilet_insert() FUNCTION plpgsql false trigger INVOKER
ft_vw_tww_damage_delete() FUNCTION plpgsql false trigger INVOKER
ft_vw_param_ca_general_update() FUNCTION plpgsql false trigger INVOKER
ft_vw_electric_equipment_delete() FUNCTION plpgsql false trigger INVOKER
ft_vw_electric_equipment_insert() FUNCTION plpgsql false trigger INVOKER
ft_vw_wastewater_node_update() FUNCTION plpgsql false trigger INVOKER
network_refresh_network_simple() FUNCTION plpgsql false void DEFINER
ft_vw_dryweather_flume_delete() FUNCTION plpgsql false trigger INVOKER
import_vw_manhole_insert_into_quarantine_or_delete() FUNCTION plpgsql false trigger INVOKER
ft_vw_dryweather_flume_insert() FUNCTION plpgsql false trigger INVOKER
ft_vw_tww_measurement_series_update() FUNCTION plpgsql false trigger INVOKER
tr_reset_od_seqval() FUNCTION plpgsql false trigger INVOKER
ft_vw_discharge_point_delete() FUNCTION plpgsql false trigger INVOKER
ft_vw_small_treatment_plant_delete() FUNCTION plpgsql false trigger INVOKER
update_wastewater_structure_label(_obj_id text, _all boolean DEFAULT false) FUNCTION plpgsql false void INVOKER
ft_vw_individual_surface_insert() FUNCTION plpgsql false trigger INVOKER
ft_vw_backflow_prevention_update() FUNCTION plpgsql false trigger INVOKER
ft_vw_electromechanical_equipment_update() FUNCTION plpgsql false trigger INVOKER
ft_vw_tww_reach_update() FUNCTION plpgsql false trigger INVOKER
ft_vw_maintenance_delete() FUNCTION plpgsql false trigger INVOKER
modification_last_modified() FUNCTION plpgsql false trigger INVOKER
ft_vw_channel_insert() FUNCTION plpgsql false trigger INVOKER
ft_vw_pump_insert() FUNCTION plpgsql false trigger INVOKER
ft_vw_tank_emptying_delete() FUNCTION plpgsql false trigger INVOKER
symbology_on_cover_change() FUNCTION plpgsql false trigger INVOKER
vw_file_delete() FUNCTION plpgsql false trigger INVOKER
ft_vw_param_ca_mouse1_insert() FUNCTION plpgsql false trigger INVOKER
ft_vw_bio_ecol_assessment_insert() FUNCTION plpgsql false trigger INVOKER
ft_vw_discharge_point_insert() FUNCTION plpgsql false trigger INVOKER
base36_to_int(base36_str text) FUNCTION plpgsql false bigint INVOKER
ft_vw_examination_delete() FUNCTION plpgsql false trigger INVOKER
symbology_on_wastewater_node_change() FUNCTION plpgsql false trigger INVOKER
ft_vw_individual_surface_delete() FUNCTION plpgsql false trigger INVOKER
ft_vw_tww_overflow_delete() FUNCTION plpgsql false trigger INVOKER
generate_oid(schema_name text, table_name text) FUNCTION plpgsql false text INVOKER
ft_vw_solids_retention_update() FUNCTION plpgsql false trigger INVOKER
wastewater_structure_update_fk_main_wastewater_node(_obj_id text DEFAULT NULL::text, _all boolean DEFAULT false) FUNCTION plpgsql false void INVOKER
ft_vw_cover_update() FUNCTION plpgsql false trigger INVOKER
update_wastewater_node_symbology(_obj_id text, _all boolean DEFAULT false) FUNCTION plpgsql false void INVOKER
ft_vw_tww_overflow_insert() FUNCTION plpgsql false trigger INVOKER
ft_vw_special_structure_update() FUNCTION plpgsql false trigger INVOKER
ft_vw_benching_delete() FUNCTION plpgsql false trigger INVOKER
ft_vw_infiltration_installation_update() FUNCTION plpgsql false trigger INVOKER
ft_vw_benching_insert() FUNCTION plpgsql false trigger INVOKER
ft_vw_tww_infiltration_installation_update() FUNCTION plpgsql false trigger INVOKER
vw_file_insert() FUNCTION plpgsql false trigger INVOKER
check_all_nulls(jason jsonb, prefix_ character varying, ignored_postfix text[] DEFAULT ARRAY['obj_id'::text, 'identifier'::text]) FUNCTION plpgsql false boolean INVOKER
audit_table(target_table regclass, audit_rows boolean, audit_query_text boolean) FUNCTION sql false void INVOKER
update_catchment_area_totals(_obj_id text, _all boolean DEFAULT false) FUNCTION plpgsql false void DEFINER
ft_vw_tww_damage_update() FUNCTION plpgsql false trigger INVOKER
ft_vw_tank_emptying_insert() FUNCTION plpgsql false trigger INVOKER
modification_on_reach_delete() FUNCTION plpgsql false trigger INVOKER
ft_vw_dryweather_downspout_update() FUNCTION plpgsql false trigger INVOKER
ft_vw_flushing_nozzle_insert() FUNCTION plpgsql false trigger INVOKER
synchronize_level_with_altitude_on_wastewater_node() FUNCTION plpgsql false trigger INVOKER
audit_table(target_table regclass) FUNCTION sql false void INVOKER

Add auditing support to the given table. Row-level changes will be logged with full client query text. No cols are ignored.

ft_vw_wastewater_node_delete() FUNCTION plpgsql false trigger INVOKER
ft_vw_tww_additional_ws_insert() FUNCTION plpgsql false trigger INVOKER
update_depth(_obj_id text, _all boolean DEFAULT false) FUNCTION plpgsql false void INVOKER
ft_vw_tww_measurement_series_delete() FUNCTION plpgsql false trigger INVOKER
modification_last_modified_parent() FUNCTION plpgsql false trigger INVOKER
ft_vw_wwtp_structure_delete() FUNCTION plpgsql false trigger INVOKER
ft_vw_examination_insert() FUNCTION plpgsql false trigger INVOKER
ft_vw_tank_emptying_update() FUNCTION plpgsql false trigger INVOKER
audit_view(target_view regclass, audit_query_text boolean, ignored_cols text[], uid_cols text[]) FUNCTION plpgsql false void INVOKER

ADD auditing support TO a VIEW.

Arguments: target_view: TABLE name, schema qualified IF NOT ON search_path audit_query_text: Record the text of the client query that triggered the audit event? ignored_cols: COLUMNS TO exclude FROM UPDATE diffs, IGNORE updates that CHANGE only ignored cols. uid_cols: MANDATORY COLUMNS to use to uniquely identify a row from the view (in order to replay UPDATE and DELETE)

Example: SELECT tww_app.audit_view(‘view_schema.view_name’, ‘true’::BOOLEAN, ‘field_to_ignore’::text[], ‘obj_id’::text[])

ft_vw_tww_maintenance_event_insert() FUNCTION plpgsql false trigger INVOKER
ft_vw_examination_update() FUNCTION plpgsql false trigger INVOKER
symbology_calculate_reach_length() FUNCTION plpgsql false trigger INVOKER
ft_vw_tww_wastewater_structure_delete() FUNCTION plpgsql false trigger INVOKER
ft_vw_tww_infiltration_installation_delete() FUNCTION plpgsql false trigger INVOKER
alter_modification_triggers(action_name text) FUNCTION plpgsql false void DEFINER
reset_od_seqval() FUNCTION plpgsql false void INVOKER
ft_vw_channel_delete() FUNCTION plpgsql false trigger INVOKER
ft_vw_pump_delete() FUNCTION plpgsql false trigger INVOKER
ft_vw_fountain_update() FUNCTION plpgsql false trigger INVOKER
ft_vw_param_ca_general_insert() FUNCTION plpgsql false trigger INVOKER
ft_vw_param_ca_general_delete() FUNCTION plpgsql false trigger INVOKER
wastewater_structure_update_fk_main_cover(_obj_id text DEFAULT NULL::text, _all boolean DEFAULT false) FUNCTION plpgsql false void INVOKER
symbology_on_reach_point_update() FUNCTION plpgsql false trigger INVOKER
ft_vw_prank_weir_update() FUNCTION plpgsql false trigger INVOKER
ft_vw_discharge_point_update() FUNCTION plpgsql false trigger INVOKER
ft_vw_infiltration_installation_insert() FUNCTION plpgsql false trigger INVOKER
ft_vw_wastewater_node_insert() FUNCTION plpgsql false trigger INVOKER
ft_vw_tww_additional_ws_delete() FUNCTION plpgsql false trigger INVOKER
symbology_update_by_channel() FUNCTION plpgsql false trigger INVOKER
ft_vw_infiltration_zone_insert() FUNCTION plpgsql false trigger INVOKER
ft_vw_tww_measurement_series_insert() FUNCTION plpgsql false trigger INVOKER
ft_vw_wwtp_structure_insert() FUNCTION plpgsql false trigger INVOKER
ft_vw_tww_maintenance_event_delete() FUNCTION plpgsql false trigger INVOKER
ft_vw_drainage_system_delete() FUNCTION plpgsql false trigger INVOKER
replay_event(pevent_id integer) FUNCTION plpgsql false void INVOKER

Replay a logged event.

Arguments: pevent_id: The event_id of the event in tww_sys.logged_actions to replay

ft_vw_tww_wastewater_structure_insert() FUNCTION plpgsql false trigger INVOKER
ft_vw_manhole_update() FUNCTION plpgsql false trigger INVOKER
ft_vw_electric_equipment_update() FUNCTION plpgsql false trigger INVOKER
reach_direction_change(reach_obj_ids text[]) FUNCTION plpgsql false void INVOKER
check_symbology_triggers_enabled() FUNCTION plpgsql false boolean DEFINER
ft_vw_drainage_system_insert() FUNCTION plpgsql false trigger INVOKER
ft_vw_access_aid_update() FUNCTION plpgsql false trigger INVOKER
ft_vw_infiltration_zone_delete() FUNCTION plpgsql false trigger INVOKER