CaselIT commented on issue #4321:
URL: https://github.com/apache/arrow-adbc/issues/4321#issuecomment-4485584318
ok but that's a really surprising behaviour, especially for something that's
not documented anywhere.
furthermore this leads to this extremely surprising behaviour:
```py
from adbc_driver_postgresql.dbapi import connect
conn = connect("postgresql://mamba:mamba_password@localhost:5432/postgres")
def go(sql):
cursor = conn.execute(sql, adbc_stmt_kwargs={'adbc.postgresql.use_copy':
False})
data = cursor.fetchone()
return data
def check_read_only():
print('current read_only', go('SHOW transaction_read_only;')[0])
print('set to on')
go('SET transaction read only;')
print('current read_only', go('SHOW transaction_read_only;')[0])
check_read_only()
print('commit')
conn.commit()
check_read_only()
print('rollback')
conn.rollback()
print('current read_only', go('SHOW transaction_read_only;')[0])
```
```
current read_only off
set to on
current read_only on
commit
current read_only off
set to on
current read_only on
rollback
current read_only on
```
I think an option to work like other driver in not opening new transaction
automatically would be very useful
--
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]