Python FlightSQL Driver stuck on query execution
- Dominant language
- C#
- Stars
- 627
- Forks
- 217
- Avg merge
- 17h
- Merged PRs (30d)
- 57
Description
### What would you like help with?
Hi,
I am running a Python 3.12 script following the recipes to try and use FlightSQL Postgresql adapter (v0.1.0) with the Python FlightSQL driver. This is on a Ubuntu WSL 1 VM on Windows 10 with Postgres 15 and FlightSQL adapter extension added to PG config as required from [here](https://arrow.apache.org/flight-sql-postgresql/0.1.0/configuration.html)
Authentication method on PG is set to `password`, that is, config is changed in `pg_hba.conf`
Script:
```
import adbc_driver_flightsql.dbapi
uri = "grpc://localhost:15432/"
username = 'postgres'
password = 'postgres'
conn = adbc_driver_flightsql.dbapi.connect(uri,
db_kwargs={'username': username, 'password': password,
'adbc.flight.sql.rpc.call_header.x-flight-sql-database': 'postgres'
})
cur = conn.cursor()
cur.execute("SELECT 1;") # stuck on this line
print(cur.fetchall())
```
This is what I see when I debug the code with a breakpoint on the call to `execute`:

The detail stacktrace for `adbc_current_catalog`:
> Traceback (most recent call last):\n File "/home/kunjmehta10/.vscode-server/extensions/ms-python.python-2021.5.926500501/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_resolver.py", line 193, in _get_py_dictionary\n attr = getattr(var, name)\n ^^^^^^^^^^^^^^^^^^\n File "/home/kunjmehta10/miniconda3/lib/python3.12/site-packages/adbc_driver_manager/dbapi.py", line 531, in adbc_current_catalog\n return self._conn.get_option(key)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "adbc_driver_manager/_lib.pyx", line 812, in adbc_driver_manager._lib.AdbcConnection.get_option\n File "adbc_driver_manager/_lib.pyx", line 237, in adbc_driver_manager._lib.check_error\nadbc_driver_manager.ProgrammingError: NOT_FOUND: [Flight SQL] failed to get current catalog: Not Found: [Flight SQL] current catalog not supported\n'
I am not sure if I am doing anything wrong or if I missed something but any help is appreciated!
Contributor guide
Research direction
Reproduce the provided Python 3.12 script with the FlightSQL PostgreSQL adapter and the stated Ubuntu WSL, PostgreSQL 15, and pg_hba.conf setup. Start at adbc_driver_flightsql.dbapi.connect and cursor.execute("SELECT 1;") and compare the behavior with the adbc_current_catalog traceback. Done means identifying why execution remains blocked or confirming the adapter's unsupported operation and documenting the result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, python
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100