Fix typo in sample code: psycopg >> psycopg2

This commit is contained in:
Sergey Golitsynskiy 2020-11-10 20:20:23 -05:00 committed by Daniele Varrazzo
parent 881bb98ab5
commit 359679b136

View File

@ -34,14 +34,14 @@ require the build or runtime prerequisites described below. Make sure to use
an up-date-date version of :program:`pip` (you can upgrade it using something an up-date-date version of :program:`pip` (you can upgrade it using something
like ``pip install -U pip``). like ``pip install -U pip``).
You may then import the ``psycopg`` package, as usual: You may then import the ``psycopg2`` package, as usual:
.. code-block:: python .. code-block:: python
import psycopg import psycopg2
# Connect to your postgres DB # Connect to your postgres DB
conn = psycopg.connect("dbname=test user=postgres") conn = psycopg2.connect("dbname=test user=postgres")
# Open a cursor to perform database operations # Open a cursor to perform database operations
cur = conn.cursor() cur = conn.cursor()