DBLINK_CANCEL_QUERY(3)

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

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