The cursor class — Psycopg 2.9.3.dev0 documentation
https://www.psycopg.org/docs/cursor.htmlThe cursor class¶ class cursor¶. Allows Python code to execute PostgreSQL command in a database session. Cursors are created by the connection.cursor() method: they are bound to the connection for the entire lifetime and all the commands are executed in the context of the database session wrapped by the connection.. Cursors created from the same connection are …