]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
doc: fix a typo in pipeline examples
authorDenis Laxalde <denis.laxalde@dalibo.com>
Wed, 25 May 2022 08:53:28 +0000 (10:53 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 25 May 2022 09:35:55 +0000 (11:35 +0200)
docs/advanced/pipeline.rst

index 21f27b5b63dd30ec30f2625c543b5f315b44f6f3..45cf507063c7fd26bc0f10919ebee7fdc84e3523 100644 (file)
@@ -176,8 +176,8 @@ several operations, using `Connection.execute()`, `Cursor.execute()` and
 .. code:: python
 
     >>> with conn.pipeline():
-    ...     cnn.execute("INSERT INTO mytable VALUES (%s)", ["hello"])
-    ...     with cnn.cursor() as cur:
+    ...     conn.execute("INSERT INTO mytable VALUES (%s)", ["hello"])
+    ...     with conn.cursor() as cur:
     ...         cur.execute("INSERT INTO othertable VALUES (%s)", ["world"])
     ...         cur.executemany(
     ...             "INSERT INTO elsewhere VALUES (%s)",