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.