mullimanko opened a new issue, #3426:
URL: https://github.com/apache/arrow-adbc/issues/3426
### What happened?
Consider the following example of python's `adbc_driver_postgresql`:
```python
import polars as pl
import adbc_driver_postgresql.dbapi as pg_dbapi
conn_str = "postgresql://username:password@host:port/database"
df = pl.DataFrame({"a": [1, 2, 3], "b": [4, 5, 6]})
with (
pg_dbapi.connect(
conn_str, conn_kwargs={"adbc.connection.autocommit": "true"}
) as conn,
conn.cursor() as cur,
):
print(conn.adbc_connection.get_option("adbc.connection.autocommit"))
cur.adbc_ingest(table_name="asdf_tst", data=df)
)
# prints "false".
with pg_dbapi.connect(conn_str) as conn, conn.cursor() as cur:
conn.adbc_connection.set_autocommit(True)
print(conn.adbc_connection.get_option("adbc.connection.autocommit"))
cur.adbc_ingest(table_name="asdf_tst", data=df)
# prints "true".
```
Passing `conn_kwargs={"adbc.connection.autocommit": "true"}` to
`adbc_driver_postgresql.dbapi.connect` has no effect (autocommit stays
`"false"`). Only using `conn.adbc_connection.set_autocommit(True)` works (data
is written only in this case). I would like to suggest allowing the use of
`conn_kwargs={"adbc.connection.autocommit": "false"}`, see also
https://stackoverflow.com/q/79761286/13968392.
### Stack Trace
_No response_
### How can we reproduce the bug?
_No response_
### Environment/Setup
package manager: uv
Python 3.13.5
adbc_driver_postgresql 1.8.0
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]