]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
Add ConnStatus.CHECK_STANDBY enum value
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 8 Dec 2021 03:11:41 +0000 (04:11 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 8 Dec 2021 03:24:04 +0000 (04:24 +0100)
Added in PostgreSQL 14, only visible during connection, if at all.

docs/api/pq.rst
docs/news.rst
psycopg/psycopg/pq/_enums.py

index a6933c4a820a76c25646756bdb89f5185a2528bc..6cd77cbe64581aa9145dc2a5cc181d0d94b5d088 100644 (file)
@@ -108,7 +108,9 @@ Enumerations
 .. autoclass:: ConnStatus
     :members:
 
-    Other possible status are only seen during the connection phase.
+    There are other values in this enum, but only `OK` and `BAD` are seen
+    after a connection has been established. Other statuses might only be seen
+    during the connection phase and are considered internal.
 
     .. seealso:: :pq:`PQstatus()` returns this value.
 
index 25beb45b628a59dc90801441b6377d51ac4543f8..aa22ec6f56d30c4b1cf4214949b146d8ee1b8f4c 100644 (file)
@@ -22,6 +22,7 @@ Psycopg 3.0.6 (unreleased)
 - Don't raise exceptions on `ServerCursor.close()` if the connection is closed
   (:ticket:`#173`).
 - Fail on `Connection.cursor()` if the connection is closed (:ticket:`#174`).
+- Add `!CHECK_STANDBY` value to `~pq.ConnStatus` enum.
 
 
 Current release
index 88e3113ca4a6741dd6825260ac39c7b31579a2f3..f7da0eb2ac7bccd95bd4cc78a96682bc4e884453 100644 (file)
@@ -30,6 +30,7 @@ class ConnStatus(IntEnum):
     CONSUME = auto()
     GSS_STARTUP = auto()
     CHECK_TARGET = auto()
+    CHECK_STANDBY = auto()
 
 
 class PollingStatus(IntEnum):