Postgresql 中文操作指南

dblink_disconnect — 关闭与远程数据库的持久连接

dblink_disconnect — closes a persistent connection to a remote database

Synopsis

dblink_disconnect() returns text
dblink_disconnect(text connname) returns text

Description

dblink_disconnect() 关闭以前由 dblink_connect() 打开的连接。无参数的形式关闭未命名的连接。

dblink_disconnect() closes a connection previously opened by dblink_connect(). The form with no arguments closes an unnamed connection.

Arguments

  • connname

    • The name of a named connection to be closed.

Return Value

返回状态,始终为 OK (因为任何错误都会导致函数抛出错误而不是返回)。

Returns status, which is always OK (since any error causes the function to throw an error instead of returning).

Examples

SELECT dblink_disconnect();
 dblink_disconnect
-------------------
 OK
(1 row)

SELECT dblink_disconnect('myconn');
 dblink_disconnect
-------------------
 OK
(1 row)