DBLINK_CANCEL_QUERY(3)

πŸ“¦ version 17.11, in opensuse-leap 16.0

okay bestie, you've found the dblink_cancel_query(3) page in the PostgreSQL 17.11 Documentation. it's giving "how do I cancel a query on a named connection?" energy, and honestly it ate. 🫢

✨ NAME ✨

dblink_cancel_query β€” cancels any active query on the named connection. periodt. πŸ’…

πŸŽ€ SYNOPSIS πŸŽ€

dblink_cancel_query(text connname) returns text

πŸ¦‹ DESCRIPTION πŸ¦‹

so dblink_cancel_query attempts to cancel any query that is in progress on the named connection. no cap. 🫢

but bestie, listen: 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. that part is literally required, okay? ✨

🌸 ARGUMENTS 🌸

  • connname β€” name of the connection to use. that's the argument, and it's doing its one job beautifully. πŸŽ€

πŸ’– RETURN VALUE πŸ’–

returns OK if the cancel request has been sent, or the text of an error message on failure. slay. πŸ’…

πŸ”₯ EXAMPLES πŸ”₯

here's the example, copied exactly because we do not mess with syntax in this house:

SELECT dblink_cancel_query('dtest1');

that's the whole page, bestie. sourced from the PostgreSQL 17.11 docs, dated 2026 β€” go forth and cancel those queries responsibly πŸ’œβœ¨

πŸ“¦ where this page comes from