DBLINK_DISCONNECT(3)

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

Okay so real talk, this page is from the <pink>PostgreSQL 16.15</pink> docs, section dblink_disconnect(3), and it's literally just about hanging up the phone on a remote database. Clean, simple, iconic. Let's go πŸŽ€


✨ SYNOPSIS ✨

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

Two flavors, same vibe. Pick your fighter 🫢


🌸 DESCRIPTION 🌸

So dblink_disconnect() closes a connection that was previously opened by dblink_connect(). That's it. That's the whole thing. Closure, literally πŸ’–

The form with no arguments closes an unnamed connection β€” you know, the one you never bothered to give a name to. No cap, it still knows which one you mean πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

  • connname β€” the name of a named connection that's getting closed. Say bye to that specific one, not the others ✨

πŸ‘‘ RETURN VALUE πŸ‘‘

Returns status, which is always OK. Like, always always. Because if anything goes wrong, the function doesn't return a sad value β€” it throws an error instead. So if you got OK back, congrats, you ate πŸ”₯


πŸ’œ EXAMPLES πŸ’œ

Closing the unnamed one, main character energy:

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

Closing your named bestie, myconn:

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

Not me getting emotional over two OKs 😭🫢


Ngl, if you're expecting some elaborate return value drama, this is not that page. OK or an error. Periodt πŸ’…

And that's the whole manual page, bestie! This lil gem comes to you courtesy of the PostgreSQL 16.15 documentation, dated 2026, and it lives at DBLINK_DISCONNECT(3) forever and ever πŸŒˆβ­πŸ’–

πŸ“¦ where this page comes from