title: Do cursors in Django run inside the open transaction?
body: <p>My Django application is using some custom SQL which I am executing inside a view like this:</p>
  
  <pre><code>db = router.db_for_write(model)
  cursor = connections[db].cursor()
  cursor.execute("INSERT INTO ....")
  </code></pre>
  
  <p>Since I am using the <code>TransactionMiddleware</code>, my view is running inside a transaction, but I'm not clear if getting a new cursor like this "escapes" the currently open transaction or if the cursor is still a part of the open transaction. I am getting some error messages that lead me to believe that cursor is running inside the transaction. </p>
  
  <p>I would like to be able to use a cursor to execute SQL commands outside of the transaction that was opened by the <code>TransactionMiddleware</code>. Is this possible?</p>
  
  <p>If it matters, I am running Django 1.4 with a PostgreSQL 8.4 database.</p>