DBLINK_DISCONNECT(3)
π DBLINK_DISCONNECT(3) π
okay so this is the PostgreSQL 17.11 Documentation page for dblink_disconnect, and bestie it is iconic because it is literally how you hang up on a remote database connection. no cap. We keep the manual name right here near the top, periodt. β¨
π NAME π
dblink_disconnect β closes a persistent connection to a remote database. She is the cleanup queen. π§Ήπ
πΈ SYNOPSIS πΈ
dblink_disconnect(text connname) returns text
π¦ DESCRIPTION π¦
dblink_disconnect() closes a connection previously opened by dblink_connect(). The form with no arguments closes an unnamed connection. The form with connname closes that named one. lowkey simple, highkey important.
π ARGUMENTS π
connnameβ the name of a named connection to be closed. that's the whole vibe check bestie π
π RETURN VALUE π
Returns status, which is always OK (since any error causes the function to throw an error instead of returning). so if you get OK, slay; if not, it threw. π«Ά
π₯ EXAMPLES π₯
closing the unnamed connection, main character energy:
SELECT dblink_disconnect();
dblink_disconnect
-------------------
OK
(1 row)
closing the named connection 'myconn', iykyk:
SELECT dblink_disconnect('myconn');
dblink_disconnect
-------------------
OK
(1 row)
shoutout to PostgreSQL 17.11 and the 2026 date on this page β docs ate and left no crumbs. π«Άπ
π¦ where this page comes from
- opensuse-leap 16.0: postgresql17-docs 17.11-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