Postgresql 中文操作指南

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 测试是否正在进行异步查询。

dblink_is_busy tests whether an async query is in progress.

Arguments

  • connname

    • Name of the connection to check.

Return Value

如果连接处于繁忙状态,则返回 1;如果它不繁忙,则返回 0。如果此函数返回 0,则保证 dblink_get_result 不会阻止。

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');