This project is archived and is in readonly mode.
Doc: connection, replace "session" with "connection"
Reported by Pierre-Louis Bonicoli | November 12th, 2012 @ 01:09 AM
In documentation (https://dndg.it/cgi-bin/gitweb.cgi?p=public/psycopg2.git;a=blob;f=d...), the first sentence explain that connection class "encapsulates a database connection". Then the terms "connection" and "session" designate the same thing. It would be clearer if "session" was replaced with "connection".
Besides "session" is used instead of "transaction" in usage.rst:
"terminate the session using the methods
~connection.commit()
".
Attached patch replace "session" with "connection" or "database session".
Comments and changes to this ticket
-
Daniele Varrazzo November 12th, 2012 @ 01:45 AM
- State changed from new to invalid
- Tag set to documentation
Hello, thank you very much for the review.
I don't agree with many of the objections raised, except two errors I've fixed in this commit. The usage of "session" and "connection" is consistent across the documentation.
The "session" is a state existing in the server; the "connection" is the python object handling a session. There is no oversight in the sentence "[the connection] Handles the connection to a PostgreSQL database instance. It encapsulates a database session." RESET manipulates properties of the session because, when received, the server changes the session properties there; if anything changes in the connection is just a consequence. "autocommit" OTOH is a property of the connection, because there is no such concept in the server session: the autocommit state only tells the connection not to issue BEGIN statements before the first query. "Idle in transaction" is a session state, not connection's. And so on.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
<b>WARNING:</b> the informations in this tracker are archived. Please submit new tickets or comments to <a href="https://github.com/psycopg/psycopg2/issues">the new tracker</a>.
<br/>
Psycopg is the most used PostgreSQL adapter for the Python programming language. At the core it fully implements the Python DB API 2.0 specifications. Several extensions allow access to many of the features offered by PostgreSQL.