Re: hstore for audit logging: Finding differences between two hstore values - Mailing list pgsql-general

From Craig Ringer
Subject Re: hstore for audit logging: Finding differences between two hstore values
Date
Msg-id 4FFFD9E6.7000506@postnewspapers.com.au
Whole thread Raw
In response to Re: hstore for audit logging: Finding differences between two hstore values  (Sergey Konoplev <sergey.konoplev@postgresql-consulting.com>)
List pgsql-general
On 07/13/2012 02:15 PM, Sergey Konoplev wrote:
> On Fri, Jul 13, 2012 at 9:51 AM, Craig Ringer
> <craig@postnewspapers.com.au> 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 completely
missed the subtraction operator in hstore's operators table.

"hstore - hstore    |    delete matching pairs from left operand"

I was thinking in terms of union/intersection/difference, didn't find
matching terms in the hstore docs, and managed to repeatedly overlook
the -(hstore,hstore) operator in the table. Thanks.

On the upside I've come up with the a truly insanely verbose and slow
way to implement the -(hstore,hstore) operator. Yay?

--
Craig Ringer


POST Newspapers
276 Onslow Rd, Shenton Park
Ph: 08 9381 3088     Fax: 08 9388 2258
ABN: 50 008 917 717
http://www.postnewspapers.com.au/

pgsql-general by date:

Previous
From: Chris Angelico
Date:
Subject: Re: PostgreSQL limitations question
Next
From: "Marc Mamin"
Date:
Subject: WITH RECURSIVE question