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:14:36 +0000 |
commit | ddef2e30cd080c21f4a52a757c642069ceb935c5 (patch) | |
tree | 122bb9308e6405c32796e75d5d7f8429e4fe1421 | |
parent | a78ac3c1253717f1f0f8f87f0c868e54f42af440 (diff) | |
download | psycopg2-ddef2e30cd080c21f4a52a757c642069ceb935c5.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 7624dc8..38cd08f 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 |