summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2018-01-11 00:14:36 +0000
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2018-01-11 00:16:49 +0000
commitba50548b30b0a9f8c856b255b249908bd1c49d22 (patch)
tree07eda18d872d0ad3daa3f07f524070620ffdb5c7
parentf3685fe5ac25528903277076a4d43a8122f4f186 (diff)
downloadpsycopg2-ba50548b30b0a9f8c856b255b249908bd1c49d22.tar.gz
'key' docs in getconn() improved
Fix #569.
-rw-r--r--doc/src/pool.rst7
1 files changed, 6 insertions, 1 deletions
diff --git a/doc/src/pool.rst b/doc/src/pool.rst
index 32bca54..a2d22a5 100644
--- a/doc/src/pool.rst
+++ b/doc/src/pool.rst
@@ -24,13 +24,18 @@ directly in the client application.
.. method:: getconn(key=None)
- Get a free connection and assign it to *key* if not `!None`.
+ Get a free connection from the pool.
+
+ The *key* parameter is optional: if used, the connection will be
+ associated to the key and calling `!getconn()` with the same key again
+ will return the same connection.
.. method:: putconn(conn, key=None, close=False)
Put away a connection.
If *close* is `!True`, discard the connection from the pool.
+ *key* should be used consistently with `getconn()`.
.. method:: closeall