-
Notifications
You must be signed in to change notification settings - Fork 173
Closed
Labels
Type: bugSomething isn't workingSomething isn't working
Milestone
Description
What happened?
Hi,
There appears to be a regression in PostgreSQL driver between 1.3.0 and 1.2.0 when it comes to handling unknown types.
-
In 1.2.0, things work as documented here: https://arrow.apache.org/adbc/main/driver/postgresql.html#unknown-types; type is binary, there is field-level metadata with the actual PG type name.
-
In 1.3.0, the
NotSupportedErrorflies instead
I have attached quick repro that queries pg catalog table with one of the unknown types.
Stack Trace
Traceback (most recent call last):
File "...", line 17, in main
cursor.execute("SELECT * FROM pg_type WHERE oid <= 6157")
File ".../.venv/lib64/python3.12/site-packages/adbc_driver_manager/dbapi.py", line 698, in execute
handle, self._rowcount = _blocking_call(
^^^^^^^^^^^^^^^
File "adbc_driver_manager/_lib.pyx", line 1573, in adbc_driver_manager._lib._blocking_call_impl
File "adbc_driver_manager/_lib.pyx", line 1566, in adbc_driver_manager._lib._blocking_call_impl
File "adbc_driver_manager/_lib.pyx", line 1217, in adbc_driver_manager._lib.AdbcStatement.execute_query
File "adbc_driver_manager/_lib.pyx", line 260, in adbc_driver_manager._lib.check_error
adbc_driver_manager.NotSupportedError: NOT_IMPLEMENTED: [libpq] Column #32 ("typacl") has unknown type code 1034
How can we reproduce the bug?
from adbc_driver_postgresql import dbapi
import adbc_driver_manager.dbapi as adbc
import pyarrow
USERNAME = ""
PASSWORD = ""
HOST = "localhost"
PORT = 5432
DATABASE = ""
def main():
c: adbc.Connection = dbapi.connect(
f"postgresql://{USERNAME}:{PASSWORD}@{HOST}:{PORT}/{DATABASE}"
)
cursor = c.cursor()
cursor.execute("SELECT * FROM pg_type WHERE oid <= 6157", ())
print(cursor.fetch_arrow_table())
if __name__ == "__main__":
main()
Environment/Setup
Python 3.12
adbc-driver-postgresql==1.3.0
Metadata
Metadata
Assignees
Labels
Type: bugSomething isn't workingSomething isn't working