I'd like to log any table. So I need to know what columns changed. Could you give me some tips for hoping result? I only want updated column.
table: test
col1 |col2 | col3
------+------+------
a | a | a
b | b | b
Query:
UPDATE test SET col2='x' WHERE col1='a'RETURNING *;
result:
col1 | col2 | col3
------+------+------
a | x | a
expected result:
| col2 |
+------+
| x |
*which means "all columns"?