Top
Enterprise Postgres 16 Release Notes

2.9.2 Changing to Output Extra NEW and OLD Values in the Audit Log when the Trigger Function Executes

Incompatibility

In FUJITSU Enterprise Postgres 13, the trigger function additionally outputs NEW and OLD values to the audit log when the pgaudit.log_parameter is set to on.

FUJITSU Enterprise Postgres 12 or earlier

The following (18) does not output the values of NEW, OLD.

[Example]

AUDIT: SESSION,WRITE,2020-09-03 07:07:39 UTC,
        (1)    (2)   (3)
[local],9775,psql,k5user,postgres,3/536, 1, 2, INSERT, ,
(4)     (5)  (6)  (7)    (8)      (9)   (10)(11)(12)(13)
TABLE,public.trig_audit, ,
(14)  (15)    (16)
 "INSERT INTO trig_audit SELECT 'U', now(), user, OLD.*, NEW.*",
(17)
trig_audit AFTER ROW UPDATE 92027 trig_test trig_test public 0  f aaaa
(18)
FUJITSU Enterprise Postgres 13 or later

NEW, OLD values are output.

[Example]

AUDIT: SESSION,WRITE,2020-09-03 07:07:39 UTC, 
[local],9775,psql,k5user,postgres,3/536,1,2,INSERT,,TABLE,public.
trig_audit,,
"INSERT INTO trig_audit SELECT 'U', now(), user, OLD.*, NEW.*",
(bbb) (aaa) trig_audit AFTER ROW UPDATE 92027 trig_test trig_test
public 0  f aaaa

Action method

If you are using an application that works by monitoring the string that the trigger function output to the audit log, modify the application to work with the NEW and OLD values.