DBLINK_GET_CONNECTIONS(3pg17)
π NAME π
Okay so bestie, listen up β dblink_get_connections is the function that literally hands you back the names of all the open named dblink connections. Like, every single one that's currently vibing in your session. No cap. π
This is page 3 of the PostgreSQL 17.11 docs, and yes we are reading the whole thing together, grab a snack π
β¨ SYNOPSIS β¨
dblink_get_connections() returns text[]
That's the whole signature, she's simple and she slays π
π¦ DESCRIPTION π¦
So the way this works: dblink_get_connections returns an array β a whole lil lineup β of the names of all the open named dblink connections. That's it, that's the whole job. She's the group chat member list, but for your dblink connections π
πΈ RETURN VALUE πΈ
You get back a text array stuffed with connection names. Cute!
But lowkey important: if there are none β like, zero, nothing, an empty friend group π β it returns NULL. Not an empty array, bestie. NULL. Write that down π«Ά
π₯ EXAMPLES π₯
Just call her, that's it:
SELECT dblink_get_connections();
Iconic. Periodt. π
fr fr, the only gotcha here is the NULL-when-empty thing β don't get caught out thinking you'll get an empty array back, because you will not π
That's the whole page, bestie β short and sweet, she ate and left no crumbs π This was DBLINK_GET_CONNECTIONS(3) from the PostgreSQL 17.11 documentation, dated 2026. Go forth and query your connections β¨π§
π¦ where this page comes from
- opensuse-leap 16.0: postgresql17-docs 17.11-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