Skip to content

Commit 284c030

Browse files
committed
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. Author: Fujii Masao, Hayato Kuroda Reviewed-by: Hayato Kuroda Discussion: https://postgr.es/m/d04aae8d-05f5-42f4-a263-b962334d9f75@oss.nttdata.com
1 parent 274bbce commit 284c030

File tree

1 file changed

+42
-11
lines changed

1 file changed

+42
-11
lines changed

doc/src/sgml/postgres-fdw.sgml

Lines changed: 42 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -780,17 +780,9 @@ OPTIONS (ADD password_required 'false');
780780
<term><function>postgres_fdw_get_connections(OUT server_name text, OUT valid boolean) returns setof record</function></term>
781781
<listitem>
782782
<para>
783-
This function returns the foreign server names of all the open
784-
connections that <filename>postgres_fdw</filename> established from
785-
the local session to the foreign servers. It also returns whether
786-
each connection is valid or not. <literal>false</literal> is returned
787-
if the foreign server connection is used in the current local
788-
transaction but its foreign server or user mapping is changed or
789-
dropped (Note that server name of an invalid connection will be
790-
<literal>NULL</literal> if the server is dropped),
791-
and then such invalid connection will be closed at
792-
the end of that transaction. <literal>true</literal> is returned
793-
otherwise. If there are no open connections, no record is returned.
783+
This function returns information about all open connections postgres_fdw
784+
has established from the local session to foreign servers. If there are
785+
no open connections, no records are returned.
794786
Example usage of the function:
795787
<screen>
796788
postgres=# SELECT * FROM postgres_fdw_get_connections() ORDER BY 1;
@@ -799,7 +791,46 @@ postgres=# SELECT * FROM postgres_fdw_get_connections() ORDER BY 1;
799791
loopback1 | t
800792
loopback2 | f
801793
</screen>
794+
The output columns are described in
795+
<xref linkend="postgres-fdw-get-connections-columns"/>.
802796
</para>
797+
798+
<table id="postgres-fdw-get-connections-columns">
799+
<title><function>postgres_fdw_get_connections</function> Output Columns</title>
800+
<tgroup cols="3">
801+
<thead>
802+
<row>
803+
<entry>Column</entry>
804+
<entry>Type</entry>
805+
<entry>Description</entry>
806+
</row>
807+
</thead>
808+
809+
<tbody>
810+
<row>
811+
<entry><structfield>server_name</structfield></entry>
812+
<entry><type>text</type></entry>
813+
<entry>
814+
The foreign server name of this connection. If the server is
815+
dropped but the connection remains open (i.e., marked as
816+
invalid), this will be <literal>NULL</literal>.
817+
</entry>
818+
</row>
819+
<row>
820+
<entry><structfield>valid</structfield></entry>
821+
<entry><type>boolean</type></entry>
822+
<entry>
823+
False if this connection is invalid, meaning it is used in
824+
the current transaction, but its foreign server or
825+
user mapping has been changed or dropped.
826+
The invalid connection will be closed at the end of
827+
the transaction. True is returned otherwise.
828+
</entry>
829+
</row>
830+
</tbody>
831+
</tgroup>
832+
</table>
833+
803834
</listitem>
804835
</varlistentry>
805836

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy