contrib-dblink-is-busy.md 514 字节
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 32
## dblink\_is\_busy

dblink\_is\_busy — checks if connection is busy with an async query

## Synopsis

```
dblink_is_busy(text connname) returns int

```

## Description

`dblink_is_busy` tests whether an async query is in progress.

## Arguments

*`connname`*

 Name of the connection to check.

## Return Value

 Returns 1 if connection is busy, 0 if it is not busy. If this function returns 0, it is guaranteed that `dblink_get_result` will not block.

## Examples

```
SELECT dblink_is_busy('dtest1');

```