from psycopg.adapt import PyFormat
from psycopg._compat import Deque
from psycopg.types.range import Range
+from psycopg.types.json import Json, Jsonb
from psycopg.types.numeric import Int4, Int8
from psycopg.types.multirange import Multirange
# There may be rounding errors or problems with inf.
continue
+ # CRDB doesn't support arrays of json
+ # https://github.com/cockroachdb/cockroach/issues/23468
+ if self.conn.info.vendor == "CockroachDB" and scls in (Json, Jsonb):
+ continue
+
schema = self.make_schema(scls)
if schema is not None:
break
assert cur.fetchone()[0] is True
+@pytest.mark.crdb("skip", reason="json array")
@pytest.mark.parametrize("val", samples)
@pytest.mark.parametrize("wrapper", ["Json", "Jsonb"])
@pytest.mark.parametrize("fmt_in", PyFormat)
assert cur.fetchone()[0] == json.loads(val)
+@pytest.mark.crdb("skip", reason="json array")
@pytest.mark.parametrize("val", samples)
@pytest.mark.parametrize("jtype", ["json", "jsonb"])
@pytest.mark.parametrize("fmt_out", pq.Format)