-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sql/pgwire: need support for decoding JSON[]
OID by aliasing to JSONB[]
OID [unknown oid type: 199]
#90839
Comments
Hello, I am Blathers. I am here to help you get the issue triaged. Hoot - a bug! Though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here. I have CC'd a few people who may be able to assist you:
If we have not gotten back to your issue within a few business days, you can try the following:
🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan. |
We could do this, but CRDB does not support JSON arrays well right now (#23468). I expect that if we fix this, it would just fail at the next step. We do have limited support for JSON arrays in aggregate functions (#70041), but I don't expect it to work as a query argument. Based on what you're saying, you got things to work with oid 3807. Could you share example code or queries of what you tried? |
JSON[]
OID by aliasing to JSONB[]
OID [unknown oid type: 199]
Here is an example that we can use to test the changes we make:
|
fixes cockroachdb#90839 Previously, with the parameter type oid (199) for JSON[], the pgwire parse message will fail to be executed with a `unknown oid type: 199`. We now aliasing it to the one for `JSONB[]`. This commit follows the changes in cockroachdb#88379. Release note (sql change): The pgwire protocol implementation can now accept arguments of the JSON[] type (oid=199). Previously, it could only accept JSONB[] (oid=3804). Internally, JSON[] and JSONB[] values are still identical, so this change only affects how the values are received over the wire protocol.
fixes cockroachdb#90839 Previously, with the parameter type oid (199) for JSON[], the pgwire parse message will fail to be executed with a `unknown oid type: 199`. We now aliasing it to the one for `JSONB[]`. This commit follows the changes in cockroachdb#88379. Release note (sql change): The pgwire protocol implementation can now accept arguments of the JSON[] type (oid=199). Previously, it could only accept JSONB[] (oid=3804). Internally, JSON[] and JSONB[] values are still identical, so this change only affects how the values are received over the wire protocol.
fixes cockroachdb#90839 Previously, with the parameter type oid (199) for JSON[], the pgwire parse message will fail to be executed with a `unknown oid type: 199`. We now aliasing it to the one for `JSONB[]`. This commit follows the changes in cockroachdb#88379. Release note (sql change): The pgwire protocol implementation can now accept arguments of the JSON[] type (oid=199). Previously, it could only accept JSONB[] (oid=3804). Internally, JSON[] and JSONB[] values are still identical, so this change only affects how the values are received over the wire protocol.
fixes cockroachdb#90839 Previously, with the parameter type oid (199) for JSON[], the pgwire parse message will fail to be executed with a `unknown oid type: 199`. We now aliasing it to the one for `JSONB[]`. This commit follows the changes in cockroachdb#88379. Release note (sql change): The pgwire protocol implementation can now accept arguments of the JSON[] type (oid=199). Previously, it could only accept JSONB[] (oid=3804). Internally, JSON[] and JSONB[] values are still identical, so this change only affects how the values are received over the wire protocol.
94705: sql/pgwire: support for decoding JSON[] OID by aliasing to JSONB[] OID r=ZhouXing19 a=ZhouXing19 Previously, with the parameter type oid (199) for JSON[], the pgwire parse message will fail to be executed with a `unknown oid type: 199`. We now aliasing it to the one for `JSONB[]`. This PR also includes a test revealing #95434. This commit follows the changes in #88379. fixes #90839 Release note (sql change): The pgwire protocol implementation can now accept arguments of the JSON[] type (oid=199). Previously, it could only accept JSONB[] (oid=3804). Internally, JSON[] and JSONB[] values are still identical, so this change only affects how the values are received over the wire protocol. Co-authored-by: Jane Xing <[email protected]>
Describe the problem
Since the fix in #88355 , CockroachDB recognises oid
114
asJSON
, and internally aliases it toJSONB
(with the oid3802
).Would it be possible to make the same fix with JSON arrays? Ideally it would treat oid
199
(JSON[]
) as oid3807
(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 asJSONB[]
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#L443Jira issue: CRDB-20967
Epic CRDB-11916
The text was updated successfully, but these errors were encountered: