Skip to content

Commit

Permalink
Fix var name in transactions doc examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ramiro authored and dvarrazzo committed Oct 17, 2021
1 parent f53f2ac commit 79be4fd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/basic/transactions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ disappointed by it), is likely:
# Creating a cursor doesn't start a transaction or affect the connection
# in any way.
cur = con.cursor()
cur = conn.cursor()
cur.execute("SELECT count(*) FROM my_table")
# This function call executes:
Expand Down Expand Up @@ -68,7 +68,7 @@ sequence of database statements:
with psycopg.connect() as conn:
cur = con.cursor()
cur = conn.cursor()
cur.execute("SELECT count(*) FROM my_table")
# This function call executes:
Expand Down Expand Up @@ -127,7 +127,7 @@ With an autocommit transaction, the above sequence of operation results in:
with psycopg.connect(autocommit=True) as conn:
cur = con.cursor()
cur = conn.cursor()
cur.execute("SELECT count(*) FROM my_table")
# This function call now only executes:
Expand Down Expand Up @@ -169,7 +169,7 @@ use a `!transaction()` context:
with psycopg.connect(autocommit=True) as conn:
cur = con.cursor()
cur = conn.cursor()
cur.execute("SELECT count(*) FROM my_table")
# The connection is autocommit, so no BEGIN executed.
Expand Down Expand Up @@ -198,7 +198,7 @@ as explained in :ref:`transactions`:
conn = psycopg.connect()
cur = con.cursor()
cur = conn.cursor()
cur.execute("SELECT count(*) FROM my_table")
# This function call executes:
Expand Down

0 comments on commit 79be4fd

Please sign in to comment.