DBLINK_DISCONNECT(3)

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

ok so bestie, welcome to dblink_disconnect(3) β€” it's a PostgreSQL thing, manual page number 3, and honestly? it's giving closure. πŸ’…


πŸŽ€ NAME πŸŽ€

dblink_disconnect β€” closes a persistent connection to a remote database

like, it's the "k bye" of dblink. the breakup text. the hang-up. 🫢


🌸 SYNOPSIS 🌸

dblink_disconnect() returns text
dblink_disconnect(text connname) returns text

two flavors, same energy. pick your fighter. ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea, bestie: dblink_disconnect() closes a connection that was previously opened by dblink_connect(). that's it. that's the whole job. it's not complicated and honestly we love that for it. πŸ’–

the form with no arguments closes an unnamed connection. no name, no problem, it just knows. main character energy fr fr. πŸ‘‘


πŸ’œ ARGUMENTS πŸ’œ

  • connname β€” the name of a named connection that you want closed. that's the one you're saying bye to. πŸ₯Ί

🌈 RETURN VALUE 🌈

it returns a status, and that status is always OK β€” because if literally anything goes wrong, the function throws an error instead of returning anything at all. so like… if you got a return value back at all, congrats, it worked. no cap. 😭

not me getting a value back and it being OK every single time… that's just how it is bestie, no ambiguous vibes here. ⭐

πŸ“ EXAMPLES πŸ“

say bye to the unnamed one:

SELECT dblink_disconnect();
 dblink_disconnect
-------------------
 OK
(1 row)

and now say bye to the one with a name, 'myconn':

SELECT dblink_disconnect('myconn');
 dblink_disconnect
-------------------
 OK
(1 row)

both iconic. both returned OK. we ate. πŸ”₯


🧚 SEE ALSO 🧚

nothing listed in this one bestie, the page keeps it mysterious πŸ’€


and that's the whole page!! πŸ’– this little masterpiece ships with PostgreSQL 18.6, and it's dated 2026 β€” shoutout to the PostgreSQL 18.6 docs squad for keeping the connection-closing lore alive. 🫢✨ go close some connections, you deserve it. πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from