DBLINK_DISCONNECT(3)
β¨ DBLINK_DISCONNECT β¨
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
- alpine 3.23: postgresql18-doc 18.6-r0 Β· PostgreSQL
- alpine 3.24: postgresql18-doc 18.6-r0 Β· PostgreSQL
- arch rolling: postgresql 18.6-4 Β· PostgreSQL
- fedora 43: postgresql-contrib 18.6-1.fc43 Β· PostgreSQL
- fedora 44: postgresql-contrib 18.6-1.fc44 Β· PostgreSQL
- nixos 26.05: postgresql 18.6
- ubuntu resolute: postgresql-doc-18 18.6-0ubuntu0.26.04.1 Β· PostgreSQL
- ubuntu stonking: postgresql-doc-18 18.6-3build2 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms