数据仓库服务 GAUSSDB(DWS)-服务器信号函数:pg_terminate_query(queryId int)

时间:2024-09-24 15:54:38

pg_terminate_query(queryId int)

描述:终止一个后端的当前查询。该函数8.1.2及以上版本支持。

返回值类型:boolean

示例:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
SELECT query_id FROM pgxc_stat_activity WHERE stmt_type ='RESET';
 query_id
----------
        0
        0
(2 rows)

SELECT pg_terminate_query(0);
 pg_terminate_query
--------------------
 f
(1 row)
support.huaweicloud.com/sqlreference-910-dws/dws_06_0055.html