From 40d3d9b0f4058bcf3041e63f71ce4c56e43e73f2 Mon Sep 17 00:00:00 2001 From: Jelte Fennema-Nio Date: Wed, 6 Mar 2024 18:33:49 +0100 Subject: [PATCH v32 1/3] Add missing connection statuses to docs The list of connection statuses that PQstatus might return during an asynchronous connection attempt was incorrect: 1. CONNECTION_SETENV is never returned anymore and is only part of the enum for backwards compatibility. So it's removed from the list. 2. CONNECTION_CHECK_STANDBY and CONNECTION_GSS_STARTUP were not listed. This addresses those problems. CONNECTION_NEEDED and CONNECTION_CHECK_TARGET are not listed in the docs on purpose, since these states are internal states that can never be observed by a caller of PQstatus. --- doc/src/sgml/libpq.sgml | 15 ++++++++++++--- src/interfaces/libpq/libpq-fe.h | 3 ++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml index 1d8998efb2a..a2bbf33d029 100644 --- a/doc/src/sgml/libpq.sgml +++ b/doc/src/sgml/libpq.sgml @@ -428,11 +428,11 @@ PostgresPollingStatusType PQconnectPoll(PGconn *conn); - - CONNECTION_SETENV + + CONNECTION_GSS_STARTUP - Negotiating environment-driven parameter settings. + Negotiating GSS encryption. @@ -446,6 +446,15 @@ PostgresPollingStatusType PQconnectPoll(PGconn *conn); + + CONNECTION_CHECK_STANDBY + + + Checking if connection is to a server in standby mode. + + + + CONNECTION_CONSUME diff --git a/src/interfaces/libpq/libpq-fe.h b/src/interfaces/libpq/libpq-fe.h index defc415fa3f..1e5e7481a7c 100644 --- a/src/interfaces/libpq/libpq-fe.h +++ b/src/interfaces/libpq/libpq-fe.h @@ -77,7 +77,8 @@ typedef enum CONNECTION_CHECK_WRITABLE, /* Checking if session is read-write. */ CONNECTION_CONSUME, /* Consuming any extra messages. */ CONNECTION_GSS_STARTUP, /* Negotiating GSSAPI. */ - CONNECTION_CHECK_TARGET, /* Checking target server properties. */ + CONNECTION_CHECK_TARGET, /* Internal state: Checking target server + * properties. */ CONNECTION_CHECK_STANDBY /* Checking if server is in standby mode. */ } ConnStatusType; base-commit: de7c6fe8347ab726c80ebbfcdb57f4b714d5243d -- 2.34.1