You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on the documentation for Postgres JSON the following should be true:
SELECT'"foo"'::jsonb ? 'foo';
To Reproduce
Postgres:
psql (11.1 (Debian 11.1-2), server 11.0 (Debian 11.0-1.pgdg90+2))
postgres=# SELECT '"foo"'::jsonb ? 'foo';
?column?
----------
t
(1 row)
Cockroach:
psql (11.1 (Debian 11.1-2), server 9.5.0)
root=# SELECT '"foo"'::jsonb ? 'foo';
?column?
----------
f
(1 row)
Expected behavior
I would expect "foo" to equal the primitive value 'foo' considering the other examples on that page yielded the same results between the two implementations in other cases I tried.
Environment:
CockroachDB version [v2.1.4]
Server OS: [Debian buster/sid, Docker 18.09.1 build 4c52b90]
Client app [any]
The text was updated successfully, but these errors were encountered:
justinj
changed the title
A string is considered to exist if it matches a primitive JSON string
sql: a string is considered to exist if it matches a primitive JSON string
Feb 15, 2019
justinj
pushed a commit
to justinj/cockroach
that referenced
this issue
Feb 19, 2019
Fixescockroachdb#35001.
Release note (sql change): The semantics of the JSON '?' operator when
applied to JSON strings has been changed to match Postgres. Now, a JSON
string '?'s a string when the two are equal.
justinj
pushed a commit
to justinj/cockroach
that referenced
this issue
Feb 23, 2019
Fixescockroachdb#35001.
Release note (sql change): The semantics of the JSON '?' operator when
applied to JSON strings has been changed to match Postgres. Now, a JSON
string '?'s a string when the two are equal.
35005: sql: fix semantics of JSON ? operator on strings r=justinj a=justinj
Fixes#35001.
Release note (sql change): The semantics of the JSON '?' operator when
applied to JSON strings has been changed to match Postgres. Now, a JSON
string '?'s a string when the two are equal.
Co-authored-by: Justin Jaffray <[email protected]>
Describe the problem
Based on the documentation for Postgres JSON the following should be true:
To Reproduce
Postgres:
Cockroach:
Expected behavior
I would expect "foo" to equal the primitive value 'foo' considering the other examples on that page yielded the same results between the two implementations in other cases I tried.
Environment:
The text was updated successfully, but these errors were encountered: