Re: [GENERAL] hstore for audit logging: Finding differences between two hstore values

2012-07-13 Thread Craig Ringer
On 07/13/2012 02:15 PM, Sergey Konoplev wrote: On Fri, Jul 13, 2012 at 9:51 AM, Craig Ringer wrote: ... but it feels like there must be a smarter way. Well, may be kind of (h1 - h2), (h2 - h1) and derivatives will make sense? I apparently have the reading skills of a stoned mole, as I comp

Re: [GENERAL] hstore for audit logging: Finding differences between two hstore values

2012-07-12 Thread Sergey Konoplev
On Fri, Jul 13, 2012 at 9:51 AM, Craig Ringer wrote: > ... but it feels like there must be a smarter way. Well, may be kind of (h1 - h2), (h2 - h1) and derivatives will make sense? -- Sergey Konoplev a database architect, software developer at PostgreSQL-Consulting.com http://www.postgresql-c

[GENERAL] hstore for audit logging: Finding differences between two hstore values

2012-07-12 Thread Craig Ringer
Hi all I'm using Pg 9.1, working on enhancing my audit logging so it can record not only the old and new values of a record when it changes, but what exactly changed. It's easy to produce hstore values for the old and new records, and I've been happily logging those. I was about to start te