DBLINK_GET_NOTIFY(3)
π NAME π
okay bestie, welcome to DBLINK_GET_NOTIFY(3) β the page all about dblink_get_notify, aka how you retrieve async notifications on a connection. it's giving βlisten for the teaβ energy, fr fr. π
β¨ SYNOPSIS β¨
dblink_get_notify() returns setof (notify_name text, be_pid int, extra text)
dblink_get_notify(text connname) returns setof (notify_name text, be_pid int, extra text)
π¦ DESCRIPTION π¦
dblink_get_notify retrieves notifications on either the unnamed connection, or on a named connection if you specify one. simple as that, no cap. β¨
but listen β to receive notifications via dblink, LISTEN must first be issued, using dblink_exec. that's the prerequisite, bestie. don't skip it. π«Ά
for the full lore, go peek at LISTEN(7) and NOTIFY(7). iykyk. π
π§ ARGUMENTS π§
connnameβ the name of a named connection to get notifications on. that's the whole vibe check for this argument. πΈ
π RETURN VALUE π
returns setof (notify_name text, be_pid int, extra text), or an empty set if none. so either you get the goods or you get absolutely nothing, and honestly? both are valid. π
π EXAMPLES π
first, issue LISTEN with dblink_exec:
SELECT dblink_exec('LISTEN virtual');
dblink_exec
-------------
LISTEN
(1 row)
then check for notifications and get zero rows:
SELECT * FROM dblink_get_notify();
notify_name | be_pid | extra
-------------+--------+-------
(0 rows)
then over here we fire off NOTIFY virtual;:
NOTIFY virtual;
NOTIFY
and check again β now there's one row, iconic:
SELECT * FROM dblink_get_notify();
notify_name | be_pid | extra
-------------+--------+-------
virtual | 1229 |
(1 row)
xoxo, your Unix bestie π
β this page is from PostgreSQL 16.15, dated 2026, and yes bestie it's DBLINK_GET_NOTIFY(3). periodt. π
π¦ 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