]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
docs: clean up a couple of sentences
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sun, 3 Apr 2022 23:26:42 +0000 (01:26 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sun, 3 Apr 2022 23:26:42 +0000 (01:26 +0200)
- New version scheme is "starting from PG 10", not "after PG 10" (also,
  chunky bit moved from docstring to docs as for most other docs).
- The transaction status is of the session, not the server.

docs/api/objects.rst
psycopg/psycopg/conninfo.py

index 76dc1f1d68a6acbfb48ef74442e0007bc33c5dad..bd3679130c808057cc565875c79c411fb0c500ae 100644 (file)
@@ -36,6 +36,13 @@ Connection information
 
     .. autoattribute:: backend_pid
     .. autoattribute:: server_version
+
+        The number is formed by converting the major, minor, and revision
+        numbers into two-decimal-digit numbers and appending them together.
+        Starting from PostgreSQL 10 the minor version was dropped, so the
+        second group of digits is always 00. For example, version 9.3.5 is
+        returned as 90305, version 10.2 as 100002.
+
     .. autoattribute:: error_message
 
     .. automethod:: get_parameters
index 11606b56789d40559c8bc4b3fc0dd49e89bbf752..b6ae174969398907d88ee92417a9e3d8545db2aa 100644 (file)
@@ -205,7 +205,7 @@ class ConnectionInfo:
     @property
     def transaction_status(self) -> pq.TransactionStatus:
         """
-        The current in-transaction status of the server.
+        The current in-transaction status of the session.
         See :pq:`PQtransactionStatus()`.
         """
         return pq.TransactionStatus(self.pgconn.transaction_status)
@@ -223,12 +223,6 @@ class ConnectionInfo:
     def server_version(self) -> int:
         """
         An integer representing the server version. See :pq:`PQserverVersion()`.
-
-        The number is formed by converting the major, minor, and revision
-        numbers into two-decimal-digit numbers and appending them together.
-        After PostgreSQL 10 the minor version was dropped, so the second group
-        of digits is always 00. For example, version 9.3.5 is returned as
-        90305, version 10.2 as 100002.
         """
         return self.pgconn.server_version