DBLINK_CANCEL_QUERY(3)
okay so bestie, you're on the dblink_cancel_query(3) page from the PostgreSQL 15.19 docs, and we're gonna make canceling queries make sense π
β¨ NAME β¨
dblink_cancel_query β cancels any active query on the named connection π
πΈ SYNOPSIS πΈ
dblink_cancel_query(text connname) returns text
π¦ DESCRIPTION π¦
So dblink_cancel_query tries to cancel any query that is in progress on the named connection. Literally attempts it. But bestie, this is not certain to succeed β for example, the remote query might already have finished by the time you ask. π
A cancel request simply improves the odds that the query will fail soon. It's giving "please wrap it up" energy, not "guaranteed shutdown" energy.
You must still complete the normal query protocol, for example by calling dblink_get_result. Don't skip that part, fr fr.
π ARGUMENTS π
connnameβ Name of the connection to use. That's the connection whose active query you're trying to cancel β¨
π RETURN VALUE π
Returns OK if the cancel request has been sent, or the text of an error message on failure. Simple as that, no cap π
π₯ EXAMPLES π₯
SELECT dblink_cancel_query('dtest1');
mwah π this iconic little page is from PostgreSQL 15.19 and is dated 2026 β slay, go cancel that query responsibly π«Ά
π¦ where this page comes from
- opensuse-leap 16.0: postgresql15-docs 15.19-160000.1.1 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms