contrib-dblink-disconnect.md 631 字节
Newer Older
K
KyleZhang 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
## 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()` 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

 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