DBLINK_DISCONNECT(3)

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

okay so bestie, this is the page for dblink_disconnect from the PostgreSQL 13.23 docs. It's giving β€œclose that connection, queen” energy, and honestly? Iconic. πŸ’…


🌸 NAME 🌸

dblink_disconnect β€” closes a persistent connection to a remote database. That's the whole vibe. No cap. ✨


✨ SYNOPSIS ✨

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

Two forms, both returning text, both ready to say bye-bye to a connection. 🫢


πŸ’– DESCRIPTION πŸ’–

okay so dblink_disconnect() closes a connection previously opened by dblink_connect(). The form with no arguments closes an unnamed connection. Literally just closing the door behind you. πŸšͺ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • connname β€” the name of a named connection to be closed. That's it. That's the argument. Slay. πŸ’…

⭐ RETURN VALUE ⭐

Returns status, which is always OK (since any error causes the function to throw an error instead of returning). So bestie, it's OK or it throws β€” no mysterious in-between behavior. periodt. 😭


🌈 EXAMPLES 🌈

No-argument form, unnamed connection, clean exit:

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

Named-connection form, same energy:

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

Both ate. Both returned OK. We love a consistent queen. πŸ‘‘


okay that's the whole page, bestie β€” source/version: PostgreSQL 13.23, date: 2025. bye-bye connection, hello closure. πŸ’–πŸ¦‹

πŸ“¦ where this page comes from