dblink_cancel_query(3)

dblink_cancel_query3

Cancels any active query on the named connection

Usage

dblink_cancel_query(text connname) returns text

Overview

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

From postgresql 18.6-4 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.