diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2018-01-11 00:14:36 +0000 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2018-01-11 00:16:49 +0000 |
commit | ba50548b30b0a9f8c856b255b249908bd1c49d22 (patch) | |
tree | 07eda18d872d0ad3daa3f07f524070620ffdb5c7 | |
parent | f3685fe5ac25528903277076a4d43a8122f4f186 (diff) | |
download | psycopg2-ba50548b30b0a9f8c856b255b249908bd1c49d22.tar.gz |
'key' docs in getconn() improved
Fix #569.
-rw-r--r-- | doc/src/pool.rst | 7 |
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 |