mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-22 08:56:34 +03:00
Fix typo in sample code: psycopg >> psycopg2
This commit is contained in:
parent
881bb98ab5
commit
359679b136
|
@ -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()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user