Re: Re: BUG #11178: JSONB : The NOT operator applies to the <@ operator, even after casting to ::bool

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org, cpronovost(at)innvue(dot)com
Subject: Re: Re: BUG #11178: JSONB : The NOT operator applies to the <@ operator, even after casting to ::bool
Date: 2014-08-16 14:41:50
Message-ID: 20140816144150.GA10717@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Aug 15, 2014 at 11:52:30PM -0400, Tom Lane wrote:
> David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> > cpronovost wrote
> >> When using the <@ operator in conjunction with the NOT operator on a jsonb
> >> column, the NOT reverse the <@ operator(becomes a @>).
>
> > The presence of "NOT" does not (aside from a possible bug) change the "<@"
> > operator into the "@>" operator. "NOT" simply inverts the supplied boolean
> > value so that "not(true) := false" and vice-versa.
>
> That's what it's *supposed* to do, but somebody got the pg_operator entry
> wrong. It looks to me like pg_operator OIDs 3246 and 3250 should be
> listed as each others' commutators, not each others' negators.
>
> Sigh. So much for no initdb for 9.4beta3. I wonder whether there are
> other thinkos in the jsonb operator entries...

Just to be clear, pg_upgrade can handle system catalog changes, while it
can't handle data format changes. However, I support changing the JSONB
data format to be optimal. FYI, I have always been concerned that
pg_upgrade would inhibit data storage format improvements.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Christopher Browne 2014-08-16 18:14:25 Re: BUG #11176: Doc bug: New York City is *not* the capital of New York State.
Previous Message Tom Lane 2014-08-16 03:52:30 Re: Re: BUG #11178: JSONB : The NOT operator applies to the <@ operator, even after casting to ::bool