add_managed_objects_triggers()


Description

Create the managed objects triggers on each table listed in road_graph.managed_objects with the column add_trigger_on_geom_change set to True.

Each trigger is only created if it does not already exist:

  • trg_calculate_managed_object_references, for all the geometry types: it calculates the references of the inserted or updated features with the function road_graph.calculate_managed_object_references,
  • trg_update_managed_object_linked_geometries, only for the linestring and multilinestring tables: it updates the lines connected to an updated line with the function road_graph.update_managed_object_linked_geometries.

It returns one line per trigger with the schema name, table name, trigger name and trigger status: created or already exists.

If no trigger can be created for a managed object, it returns one line with an empty trigger name and the status: not requested, table not found or geom column not found.

Parameters

Name Type Mode
schema_name text TABLE
table_name text TABLE
trigger_name text TABLE
trigger_status text TABLE

Definition