Skip to content

Commit e3f75c6

Browse files
committed
Merge pull request 2ndQuadrant#7 from jhm713/fix_updates_with_excluded_cols
updates were logging excluded_cols
2 parents 618bd11 + 3f8212b commit e3f75c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

audit.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ BEGIN
122122
END IF;
123123

124124
IF (TG_OP = 'UPDATE' AND TG_LEVEL = 'ROW') THEN
125-
audit_row.row_data = hstore(OLD.*);
125+
audit_row.row_data = hstore(OLD.*) - excluded_cols;
126126
audit_row.changed_fields = (hstore(NEW.*) - audit_row.row_data) - excluded_cols;
127127
IF audit_row.changed_fields = hstore('') THEN
128128
-- All changed fields are ignored. Skip this update.

0 commit comments

Comments
 (0)