3.7.1. History viewer

PostgresSQL history viewer plugin allows you to retrieve modification on the QGEP database.

Install the plugin from the QGIS Plugin repository.

../../_images/history_viewer_plugin.jpg Plugin configuration


First, you have to configure the plugin for the session like this:

../../_images/pg_hv_configuration.png Database configuration

Then you need to enable logging on desired tables or views.

  • For views:

    SELECT qgep_sys.audit_view('qgep_od.vw_qgep_wastewater_structure', 'true'::boolean, '{}'::text[], '{obj_id}'::text[]);
  • For tables:

    SELECT qgep_sys.audit_table('qgep_od.reach_point');


You can disable logging with:

SELECT qgep_sys.unaudit_view('qgep_od.vw_qgep_wastewater_structure');
SELECT qgep_sys.unaudit_table('qgep_od.reach_point'); Usage

The « logged events » window is composed of 4 parts.

    1. Part identifying the tools used to filter modifications in the database.

    1. Logged events with the modification date, the table, the action type « Update/Delete/Insert », the application and the user who made the modification.

    1. The view comparing the data before and after the change. The red lines are the ones modified.

    1. If the geometry has been modified, a canvas will show the difference. Replay function

If you have configured the replay option, you can replay actions. Example below:

Actual value:


Select the event you want to replay and its values will become the current ones. Example for the year that becomes 2004 again: