DBLINK_CANCEL_QUERY(3)

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

okay bestie, welcome to the dblink_cancel_query page β€” it's a PostgreSQL 18.6 manual page, section 3 (that's the library-call girlies, iykyk) ✨


🌸 NAME 🌸

dblink_cancel_query β€” cancels any active query on the named connection πŸ›‘

πŸ¦‹ SYNOPSIS πŸ¦‹

dblink_cancel_query(text connname) returns text

✨ DESCRIPTION ✨

so what this does is: dblink_cancel_query attempts to cancel any query that's in progress on the named connection. it's giving "hey bestie, wrap it up" 🫢

but real talk β€” this is not certain to succeed. not to be dramatic but it literally cannot promise you anything, because (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. that's it. that's the whole vibe πŸ’€

and the part people always forget: you must still complete the normal query protocol, for example by calling dblink_get_result. the cancel is not a substitute for finishing your homework, bestie, it's just a lil nudge πŸŽ€

πŸ‘‘ ARGUMENTS πŸ‘‘

  • connname β€” name of the connection to use. like, which one. the connection. the name of it. πŸ’…

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

not me writing an entire manpage just to say "we tried to cancel it, no promises" 😭 this is lowkey the most honest function in the whole extension and I respect it fr fr

okay that's the whole page, slay, you're welcome πŸ’– main character energy from you for reading all of it ✨

PostgreSQL 18.6 Β· 2026 Β· DBLINK_CANCEL_QUERY(3) β€” bye bestie, go cancel something πŸ¦‹

πŸ“¦ where this page comes from