Skip to content

sql/pgwire: need support for decoding JSON[] OID by aliasing to JSONB[] OID [unknown oid type: 199] #90839

@danieljharvey

Description

@danieljharvey

Describe the problem

Since the fix in #88355 , CockroachDB recognises oid 114 as JSON, and internally aliases it to JSONB (with the oid 3802).

Would it be possible to make the same fix with JSON arrays? Ideally it would treat oid 199 (JSON[]) as oid 3807 (JSONB[])?

If we send the same queries with 3807 instead everything works.

Expected behavior
Ideally, JSON[] input with oid 199 would be accepted in the wire format and treated as JSONB[] internally.

Additional context
Discovered whilst implementing subscriptions for Hasura Graphql Engine

Expected oid values found in here: https://github.com/postgres/postgres/blob/5543677ec90a15c73dab5ed4f0902b3b920f0b87/src/include/catalog/pg_type.dat#L443

Jira issue: CRDB-20967
Epic CRDB-11916

Metadata

Metadata

Assignees

Labels

A-tools-hasuraC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.E-quick-winLikely to be a quick win for someone experienced.O-communityOriginated from the communityT-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)X-blathers-triagedblathers was able to find an owner

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions