Contents

The pgmemento.table_event_log table stores metadata about different kind of events happening during one transaction against one table. Like transactions, they are inserted by the pgmemento.log_table_event function called from table triggers or event trigger. Each event type is only logged once per transaction and statement timestamp per table. There is UNIQUE index defined on the event_key column which concatenates the timestamp timestamp with values from columns stmt_time, the internal txid, the op_id, table_name and schema_name. The log table contains the following columns: * id SERIAL: The Primary Key * transaction_id INTEGER NOT NULL: Foreign Key to transaction_log table * stmt_time TIMESTAMP WITH TIME ZONE: Stores the result of statement_timestamp() function * op_id SMALLINT NOT NULL: ID of event type * table_operation TEXT: Text for of event type * table_name TEXT NOT NULL: Name of table that fired the trigger * schema_name TEXT NOT NULL: Schema of firing table * event_key TEXT: Concatenated information of most columns to join with row-based logs