DBLINK_DISCONNECT(3)
π dblink_disconnect β bestie, it's time to say goodbye to your remote database connection
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
- opensuse-leap 16.0: postgresql16-docs 16.15-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