3 ms·
I've also used an update trigger to track only changed columns, inspired by this post[0] which wraps a comparison function into a new subtract operator for JSON
by jsmith99 5y ago
I've also used an update trigger to track only changed columns, inspired by this post[0] which wraps a comparison function into a new subtract operator for JSONB, similar to the built in subtract operator for HSTORE which removes any keypairs that haven't changed.
[0] http://8kb.co.uk/blog/2015/01/19/copying-pavel-stehules-simple-history-table-but-with-the-jsonb-type/ http://8kb.co.uk/blog/2015/01/19/copying-pavel-stehules-simp...
- oliverrice 5y agothats a cool solution for reducing storage. nice!