From: Christian Pronovost <cpronovost@innvue.com>
To: pgsql-bugs@postgresql.org
Subject: Re: BUG #11178: JSONB : The NOT operator applies to the <@ operator, even after casting to ::bool
Date: Mon, 18 Aug 2014 06:39:03 -0700 (PDT)
Message-ID: <1408369143374-5815229.post@n5.nabble.com> (raw)
In-Reply-To: <1408147143170-5815058.post@n5.nabble.com>
References: <20140815211138.2543.16364@wrigleys.postgresql.org>
<1408147143170-5815058.post@n5.nabble.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
David G Johnston wrote
> The presence of "NOT" does not (aside from a possible bug) change the "<@"
> operator into the "@>" operator.
I was wrong assuming the inversion of the "<@" operator.
> "NOT" simply inverts the supplied boolean value.
This does not seem to be the case. In the following example, the same query
returns false whether there is a NOT operator or not.
SELECT (testcolumn->'ID' <@ '["2"]') FROM "TestJsonb" --Returns false (as
expected)
SELECT NOT(testcolumn->'ID' <@ '["2"]') FROM "TestJsonb" --Returns false
(*not as expected*)
To be noted that outside of the context of a table, this works fine:
SELECT ('"1"'::jsonb <@ '["2"]') --Returns false (as expected)
SELECT NOT('"1"'::jsonb <@ '["2"]') --Returns true (as expected)
I am confused
--
View this message in context: http://postgresql.1045698.n5.nabble.com/BUG-11178-JSONB-The-NOT-operator-applies-to-the-operator-eve...
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: cpronovost@innvue.com
Subject: Re: BUG #11178: JSONB : The NOT operator applies to the <@ operator, even after casting to ::bool
In-Reply-To: <1408369143374-5815229.post@n5.nabble.com>
References: <20140815211138.2543.16364@wrigleys.postgresql.org> <1408147143170-5815058.post@n5.nabble.com> <1408369143374-5815229.post@n5.nabble.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox