v33-0001-Add-missing-connection-statuses-to-docs.patch
application/octet-stream
Filename: v33-0001-Add-missing-connection-statuses-to-docs.patch
Type: application/octet-stream
Part: 2
Patch
Format: format-patch
Series: patch v33-0001
Subject: Add missing connection statuses to docs
| File | + | − |
|---|---|---|
| doc/src/sgml/libpq.sgml | 12 | 3 |
| src/interfaces/libpq/libpq-fe.h | 2 | 1 |
From 05f80e7711b69b6735c22cf2cfe63271bf9e4954 Mon Sep 17 00:00:00 2001
From: Jelte Fennema-Nio <jelte.fennema@microsoft.com>
Date: Wed, 6 Mar 2024 18:33:49 +0100
Subject: [PATCH v33 1/5] 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);
</listitem>
</varlistentry>
- <varlistentry id="libpq-connection-setenv">
- <term><symbol>CONNECTION_SETENV</symbol></term>
+ <varlistentry id="libpq-connection-gss-startup">
+ <term><symbol>CONNECTION_GSS_STARTUP</symbol></term>
<listitem>
<para>
- Negotiating environment-driven parameter settings.
+ Negotiating GSS encryption.
</para>
</listitem>
</varlistentry>
@@ -446,6 +446,15 @@ PostgresPollingStatusType PQconnectPoll(PGconn *conn);
</listitem>
</varlistentry>
+ <varlistentry id="libpq-connection-check-standby">
+ <term><symbol>CONNECTION_CHECK_STANDBY</symbol></term>
+ <listitem>
+ <para>
+ Checking if connection is to a server in standby mode.
+ </para>
+ </listitem>
+ </varlistentry>
+
<varlistentry id="libpq-connection-consume">
<term><symbol>CONNECTION_CONSUME</symbol></term>
<listitem>
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: e444ebcb85c0b55b1ccf7bcb785ad2708090a2a2
--
2.34.1