Comment 4 for bug 1170063

Revision history for this message
Oscar Campos (oscar-campos) wrote :

Hi guys.

I did a different workaround to fix this problem. We can't patch a built-in extension but we can patch a class that inherits from this built-in so I just catch the exception on the exceptions.py module, and create a subclass of psycopg2.Error that replaces this one so we can just patch the Error into its bases that becomes (psycopg2.Error, Error).

Is not necessary to modify the Connection.rollbak method. I ran the full PostgreSQL testsuite with no failures.