Added documentation for 'connection.reset()' method.

This commit is contained in:
Daniele Varrazzo 2010-02-13 05:43:40 +00:00 committed by Federico Di Gregorio
parent a856f0724e
commit c72dc3af00

View File

@ -32,6 +32,7 @@ The ``connection`` class
The :obj:`!name` and :obj:`!cursor_factory` parameters are Psycopg The :obj:`!name` and :obj:`!cursor_factory` parameters are Psycopg
extensions to the |DBAPI|. extensions to the |DBAPI|.
.. index:: .. index::
pair: Transaction; Commit pair: Transaction; Commit
@ -86,6 +87,23 @@ The ``connection`` class
(0) or closed (1). (0) or closed (1).
.. method:: reset
Reset the connection to the default.
The method rolls back an eventual pending transaction and executes the
PostgreSQL |RESET|_ and |SET SESSION AUTHORIZATION|__ to revert the
session to the default values.
.. |RESET| replace:: :sql:`RESET`
.. _RESET: http://www.postgresql.org/docs/8.4/static/sql-reset.html
.. |SET SESSION AUTHORIZATION| replace:: :sql:`SET SESSION AUTHORIZATION`
.. __: http://www.postgresql.org/docs/8.4/static/sql-set-session-authorization.html
.. versionadded:: 2.0.12
.. attribute:: dsn .. attribute:: dsn
Read-only string containing the connection string used by the Read-only string containing the connection string used by the