You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "CaselIT (via GitHub)" <gi...@apache.org> on 2026/04/03 09:47:51 UTC
[I] Document that json/jsonb is returned as string in postgresql [arrow-adbc]
CaselIT opened a new issue, #4179:
URL: https://github.com/apache/arrow-adbc/issues/4179
### What feature or improvement would you like to see?
I think it would make sense to document that the json/jsonb dtypes are returned as strings here https://arrow.apache.org/adbc/current/driver/postgresql.html, or at least update the Unknown Types section to mention that it's not always a binary that's returned
```py
from adbc_driver_postgresql import dbapi
q = """SELECT
'{"foo": 1, "bar": "baz"}'::jsonb a,
'{"foo": 1, "bar": "baz"}'::json b
"""
def go():
with dbapi.connect("postgresql://scott:tiger@localhost:5432/scott") as conn:
with conn.cursor() as cur:
cur.execute(q)
row = cur.fetchone()
print(row, [type(col) for col in row])
t = cur.execute(q).fetch_arrow_table()
print(t)
go()
```
this prints
```
('{"bar": "baz", "foo": 1}', '{"foo": 1, "bar": "baz"}') [<class 'str'>, <class 'str'>]
pyarrow.Table
a: string
b: string
----
a: [["{"bar": "baz", "foo": 1}"]]
b: [["{"foo": 1, "bar": "baz"}"]]
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Document that json/jsonb is returned as string in postgresql [arrow-adbc]
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm closed issue #4179: Document that json/jsonb is returned as string in postgresql
URL: https://github.com/apache/arrow-adbc/issues/4179
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Document that json/jsonb is returned as string in postgresql [arrow-adbc]
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #4179:
URL: https://github.com/apache/arrow-adbc/issues/4179#issuecomment-4183244174
Oh sure: I'm just saying we should be able to set up documentation that gets validated against the driver instead of having to update by hand 😅
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Document that json/jsonb is returned as string in postgresql [arrow-adbc]
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #4179:
URL: https://github.com/apache/arrow-adbc/issues/4179#issuecomment-4183190989
Ah...hmm, I thought we returned the extension type now. We should also be auto-generating the type table from the validation suite instead of hardcoding it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Document that json/jsonb is returned as string in postgresql [arrow-adbc]
Posted by "CaselIT (via GitHub)" <gi...@apache.org>.
CaselIT commented on issue #4179:
URL: https://github.com/apache/arrow-adbc/issues/4179#issuecomment-4183233451
to clarify, I don't mind the string, I just though it made sense documenting it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Document that json/jsonb is returned as string in postgresql [arrow-adbc]
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #4179:
URL: https://github.com/apache/arrow-adbc/issues/4179#issuecomment-4677309900
(I've confirmed it does return string intentionally; I'll fix it to return the Arrow JSON extension type too, and updated the table in the meantime.)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org