DBLINK_SEND_QUERY(3)

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

πŸ’– NAME πŸ’–

okay so this is the DBLINK_SEND_QUERY(3) page from the PostgreSQL 16.15 docs, and it's literally about dblink_send_query β€” which sends an async query to a remote database. periodt. ✨


✨ SYNOPSIS ✨

dblink_send_query(text connname, text sql) returns int

πŸ¦‹ DESCRIPTION πŸ¦‹

dblink_send_query sends a query to be executed asynchronously β€” meaning it fires it off without immediately waiting for the result. bestie, it's giving "send it and go live your life" energy. πŸ’…

🚨 important vibe check: there must not be an async query already in progress on the connection. like, one at a time, pls.

After successfully dispatching an async query, completion status can be checked with dblink_is_busy, and the results are ultimately collected with dblink_get_result. It is also possible to attempt to cancel an active async query using dblink_cancel_query. πŸ¦‹


πŸŽ€ ARGUMENTS πŸŽ€

  • connname β€” Name of the connection to use. 🫢
  • sql β€” The SQL statement that you wish to execute in the remote database, for example select * from pg_class.

🌸 RETURN VALUE 🌸

Returns 1 if the query was successfully dispatched, 0 otherwise. no cap. 🌟


πŸ“ EXAMPLES πŸ“

SELECT dblink_send_query('dtest1', 'SELECT * FROM foo WHERE f1 < 3');

okay that's the whole page, mwah πŸ’‹ β€” source/version: PostgreSQL 16.15, dated 2026, and the page is DBLINK_SEND_QUERY(3). πŸŽ€βœ¨

πŸ“¦ where this page comes from