The code modified using a connection context will result in the following
sequence of database statements:
-.. code:: python
+.. code-block:: python
+ :emphasize-lines: 1
with psycopg.connect() as conn:
With an autocommit transaction, the above sequence of operation results in:
-.. code:: python
+.. code-block:: python
+ :emphasize-lines: 1
with psycopg.connect(autocommit=True) as conn:
still wrap selected groups of commands inside an atomic transaction, you can
use a `!transaction()` context:
-.. code:: python
+.. code-block:: python
+ :emphasize-lines: 8
with psycopg.connect(autocommit=True) as conn: