From 53d07523a8e6c44043cdae8782282e5018f14953 Mon Sep 17 00:00:00 2001 From: Fujii Masao Date: Thu, 25 Jul 2024 20:35:12 +0900 Subject: [PATCH v43 1/3] doc: Enhance documentation for postgres_fdw_get_connections() output columns. The documentation previously described the output columns of postgres_fdw_get_connections() in text format, which was manageable for the original two columns. However, upcoming patches will add new columns, making text descriptions less readable. This commit updates the documentation to use a table format, making it easier for users to understand each output column. --- doc/src/sgml/postgres-fdw.sgml | 53 +++++++++++++++++++++++++++------- 1 file changed, 42 insertions(+), 11 deletions(-) diff --git a/doc/src/sgml/postgres-fdw.sgml b/doc/src/sgml/postgres-fdw.sgml index 1a600382e2..c7e0a7d2a6 100644 --- a/doc/src/sgml/postgres-fdw.sgml +++ b/doc/src/sgml/postgres-fdw.sgml @@ -780,17 +780,9 @@ OPTIONS (ADD password_required 'false'); postgres_fdw_get_connections(OUT server_name text, OUT valid boolean) returns setof record - This function returns the foreign server names of all the open - connections that postgres_fdw established from - the local session to the foreign servers. It also returns whether - each connection is valid or not. false is returned - if the foreign server connection is used in the current local - transaction but its foreign server or user mapping is changed or - dropped (Note that server name of an invalid connection will be - NULL if the server is dropped), - and then such invalid connection will be closed at - the end of that transaction. true is returned - otherwise. If there are no open connections, no record is returned. + This function returns information about all open connections that + postgres_fdw has established from the local session to foreign servers. + If there are no open connections, no records are returned. Example usage of the function: postgres=# SELECT * FROM postgres_fdw_get_connections() ORDER BY 1; @@ -799,7 +791,46 @@ postgres=# SELECT * FROM postgres_fdw_get_connections() ORDER BY 1; loopback1 | t loopback2 | f + The output columns are described in + . + + + <function>postgres_fdw_get_connections</function> Output Columns + + + + Column + Type + Description + + + + + + server_name + text + + The foreign server name of this connection. If the server is + dropped but the connection remains open (i.e., marked as + invalid), this will be NULL. + + + + valid + boolean + + False if this connection is invalid, meaning it is used in + the current transaction but its foreign server or + user mapping has been changed or dropped. + The invalid connection will be closed at the end of + the transaction. True is returned otherwise. + + + + +
+
-- 2.45.2