From: | Christian Pronovost <cpronovost(at)innvue(dot)com> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #11178: JSONB : The NOT operator applies to the <@ operator, even after casting to ::bool |
Date: | 2014-08-18 13:39:03 |
Message-ID: | 1408369143374-5815229.post@n5.nabble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-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-even-after-casting-to-bool-tp5815056p5815229.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.
From | Date | Subject | |
---|---|---|---|
Next Message | David G Johnston | 2014-08-18 13:55:06 | Re: BUG #11178: JSONB : The NOT operator applies to the <@ operator, even after casting to ::bool |
Previous Message | cbarham | 2014-08-18 13:20:31 | BUG #11205: Documentation - loading the JDBC driver |