From: Daniele Varrazzo Date: Tue, 21 Sep 2021 19:01:48 +0000 (+0100) Subject: Improve pq.version() doc X-Git-Tag: 3.0~69 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4ce753f21a0994ef1b27012c656b8c6d77e0516c;p=thirdparty%2Fpsycopg.git Improve pq.version() doc --- diff --git a/docs/api/pq.rst b/docs/api/pq.rst index c55a414ab..a6933c4a8 100644 --- a/docs/api/pq.rst +++ b/docs/api/pq.rst @@ -69,10 +69,6 @@ Module content .. autofunction:: version - .. admonition:: TODO - - Document pg10 quirk. - .. seealso:: the :pq:`PQlibVersion()` function diff --git a/psycopg/psycopg/pq/pq_ctypes.py b/psycopg/psycopg/pq/pq_ctypes.py index 7a6f55547..5c8bb0ba8 100644 --- a/psycopg/psycopg/pq/pq_ctypes.py +++ b/psycopg/psycopg/pq/pq_ctypes.py @@ -33,7 +33,12 @@ logger = logging.getLogger("psycopg") def version() -> int: - """Return the version number of the libpq currently loaded.""" + """Return the version number of the libpq currently loaded. + + The number is in the same format of `~psycopg.ConnectionInfo.server_version`. + + Certain features might not be available if the libpq library used is too old. + """ return impl.PQlibVersion()