January 2019
Beginner
556 pages
14h 19m
English
In the following example, another general auditing technique will be presented, which can be applied to several tables, while some table columns can be excluded from auditing. The new editing techniques use the hstore extension. hstore defines a hash map data type and provides a set of functions and operators to handle this data type. In the new auditing technique, the table rows will be stored as a hash map. The first step is to create the hstore extension and a table where the audited data will be stored, as follows:
SET search_path to car_portal_app;CREATE extension hstore;CREATE TABLE car_portal_app.log( schema_name text NOT NULL, table_name text NOT NULL, old_row hstore, new_row hstore, action TEXT check (action ...
Read now
Unlock full access