dblink\_cancel\_query

|        dblink\_cancel\_query         |                 |            |                  |                                     |
|:------------------------------------:|-----------------|------------|------------------|-------------------------------------|
|[Prev](contrib-dblink-get-result.html)|[Up](dblink.html)|F.10. dblink|[Home](index.html)| [Next](contrib-dblink-get-pkey.html)|

---

[]()

## dblink\_cancel\_query

dblink\_cancel\_query — cancels any active query on the named connection

## Synopsis

```
dblink_cancel_query(text connname) returns text

```

## Description

`dblink_cancel_query` attempts to cancel any query that is in progress on the named connection. Note that this is not certain to succeed (since, for example, the remote query might already have finished). A cancel request simply improves the odds that the query will fail soon. You must still complete the normal query protocol, for example by calling `dblink_get_result`.

## Arguments

*`connname`*

 Name of the connection to use.

## Return Value

 Returns `OK` if the cancel request has been sent, or the text of an error message on failure.

## Examples

```
SELECT dblink_cancel_query('dtest1');

```

---

|[Prev](contrib-dblink-get-result.html)|[Up](dblink.html) | [Next](contrib-dblink-get-pkey.html)|
|:-------------------------------------|:----------------:|------------------------------------:|
|         dblink\_get\_result          |[Home](index.html)|          dblink\_get\_pkey          |

 // \<![CDATA[ \<-- For SVG support if ('WebSocket' in window) { (function() { function refreshCSS() { var sheets = [].slice.call(document.getElementsByTagName("link")); var head = document.getElementsByTagName("head")[0]; for (var i = 0; i \< sheets.length; ++i) { var elem = sheets[i]; head.removeChild(elem); var rel = elem.rel; if (elem.href && typeof rel != "string" || rel.length == 0 || rel.toLowerCase() == "stylesheet") { var url = elem.href.replace(/(&|\\?)\_cacheOverride=\\d+/, ''); elem.href = url + (url.indexOf('?') \>= 0 ? '&' : '?') + '\_cacheOverride=' + (new Date().valueOf()); } head.appendChild(elem); } } var protocol = window.location.protocol === 'http:' ? 'ws://' : 'wss://'; var address = protocol + window.location.host + window.location.pathname + '/ws'; var socket = new WebSocket(address); socket.onmessage = function(msg) { if (msg.data == 'reload') window.location.reload(); else if (msg.data == 'refreshcss') refreshCSS(); }; console.log('Live reload enabled.'); })(); } // ]]\>