Description
Running the following yields psycopg2.InternalError: SAVEPOINT not supported except for COCKROACH_RESTART
I believe this is due to https://github.com/cockroachdb/cockroachdb-python/blob/master/cockroachdb/sqlalchemy/transaction.py#L54.
Why do we need savepoint_state.cockroach_restart
? Considering that CockroachDB supports no other savepoint name, why not hard-code it and drop the conditional in the following functions:
https://github.com/cockroachdb/cockroachdb-python/blob/master/cockroachdb/sqlalchemy/dialect.py#L158
Steps to reproduce:
docker run -p 26257:26257 cockroachdb/cockroach:v1.0 start --insecure
Then run the following code:
https://gist.github.com/gpaul/648189354975992a2c285143d08be88a
This gives the following output using cockroachdb-python v0.1
:
https://gist.github.com/gpaul/14fa2967c42d4ccf6b223322a7967476