Use of a new cursor for each transaction.
with syntaxe is not compatible with psycopg2 < 2.5.