From 4ce753f21a0994ef1b27012c656b8c6d77e0516c Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Tue, 21 Sep 2021 20:01:48 +0100 Subject: [PATCH] Improve pq.version() doc --- docs/api/pq.rst | 4 ---- psycopg/psycopg/pq/pq_ctypes.py | 7 ++++++- 2 files changed, 6 insertions(+), 5 deletions(-) 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() -- 2.47.3