Open keeganmccallum opened 5 years ago
I've found one use case that was a bit difficult, which is using records to perform routine maintenance. I was able to work around with the following code(sql is a records db):
sql
from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT ... vac_conn = sql._engine.raw_connection() vac_conn.set_isolation_level(ISOLATION_LEVEL_AUTOCOMMIT) vac_curr = vac_conn.cursor() vac_curr.execute("VACUUM (ANALYZE)") vac_conn.close()
It would be great to add a raw flag to the query method, or even just have a raw method to be able to call sql outside of transaction blocks.
raw
query
interesting
I will fix this.
-raw flag is Perfect!!
I've found one use case that was a bit difficult, which is using records to perform routine maintenance. I was able to work around with the following code(
sql
is a records db):It would be great to add a
raw
flag to thequery
method, or even just have araw
method to be able to call sql outside of transaction blocks.