diff --git a/doc/src/extensions.rst b/doc/src/extensions.rst index 3f010665..84e12412 100644 --- a/doc/src/extensions.rst +++ b/doc/src/extensions.rst @@ -199,12 +199,14 @@ functionalities defined by the |DBAPI|_. .. function:: libpq_version() - Query actual ``libpq`` version loaded. + Return the version number of the ``libpq`` dynamic library loaded as an + integer, in the same format of `~connection.server_version`. - This function throws `NotSupportedError` if it was compiled with - ``libpq < 9.1``. + Raise `~psycopg2.NotSupportedError` if the ``psycopg2`` module was + compiled with a ``libpq`` version lesser than 9.1 (which can be detected + by the `~psycopg2.__libpq_version__` constant). - .. seealso:: libpq docs for `PQlibVersion()`__ + .. seealso:: libpq docs for `PQlibVersion()`__. .. __: http://www.postgresql.org/docs/current/static/libpq-misc.html#LIBPQ-PQLIBVERSION diff --git a/doc/src/module.rst b/doc/src/module.rst index bd6bcf45..bd121e9d 100644 --- a/doc/src/module.rst +++ b/doc/src/module.rst @@ -111,10 +111,11 @@ The module interface respects the standard defined in the |DBAPI|_. .. data:: __libpq_version__ - Integer contant containing the version of ``libpq`` this `psycopg2` - module was compiled with. If this value is ``>= 90100`` then you - may query for the actually loaded version of libpq using - `~psycopg2.extensions.libpq_version()`. + Integer constant reporting the version of the ``libpq`` library this + ``psycopg2`` module was compiled with (in the same format of + `~connection.server_version`). If this value is lesser than ``90100`` + then you may query the version of the actually loaded library using the + `~psycopg2.extensions.libpq_version()` function. .. index::