diff options
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/postgres-fdw.sgml | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/doc/src/sgml/postgres-fdw.sgml b/doc/src/sgml/postgres-fdw.sgml index e6fd2143c10..6a91926da83 100644 --- a/doc/src/sgml/postgres-fdw.sgml +++ b/doc/src/sgml/postgres-fdw.sgml @@ -479,6 +479,38 @@ OPTIONS (ADD password_required 'false'); </sect3> </sect2> +<sect2> + <title>Functions</title> + + <variablelist> + <varlistentry> + <term><function>postgres_fdw_get_connections(OUT server_name text, OUT valid boolean) returns setof record</function></term> + <listitem> + <para> + This function returns the foreign server names of all the open + connections that <filename>postgres_fdw</filename> established from + the local session to the foreign servers. It also returns whether + each connection is valid or not. <literal>false</literal> 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, and then such invalid connection will be closed at + the end of that transaction. <literal>true</literal> is returned + otherwise. If there are no open connections, no record is returned. + Example usage of the function: + <screen> +postgres=# SELECT * FROM postgres_fdw_get_connections() ORDER BY 1; + server_name | valid +-------------+------- + loopback1 | t + loopback2 | f +</screen> + </para> + </listitem> + </varlistentry> + </variablelist> + +</sect2> + <sect2> <title>Connection Management</title> |