DBLINK_ERROR_MESSAGE(3)

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

okay bestie, so this is the dblink_error_message page from the PostgreSQL 14.24 docs, manual section 3. she's a little one but she's important, so let's get into it 🫢


✨ NAME ✨

dblink_error_message β€” literally just grabs the last error message on the connection you named πŸ’…


🌸 SYNOPSIS 🌸

dblink_error_message(text connname) returns text

that's it. one argument, one text back. no cap πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

so dblink_error_message fetches the most recent remote error message for a given connection. that's the whole vibe check β€” you point her at a connection, she tells you what went wrong last time over there ✨


πŸ“ ARGUMENTS πŸ“

  • connname β€” the name of the connection you wanna use. that's the one. the only one. iconic of her honestly πŸ‘‘

πŸ‘‘ RETURN VALUE πŸ‘‘

she returns the last error message, or OK if there has been no error in this connection. so if you get OK, congrats bestie, nothing's on fire πŸ”₯


🧚 NOTES 🧚

⚠️ listen up, this part matters ⚠️

when asynchronous queries are initiated by dblink_send_query, the error message associated with the connection might not get updated until the server's response message is consumed 😭

what that typically means: you should call dblink_is_busy or dblink_get_result prior to dblink_error_message, so that any error generated by the asynchronous query will actually be visible. otherwise she's just standing there with stale info like πŸ™ˆ


🌈 EXAMPLES 🌈

SELECT dblink_error_message('dtest1');

one line, does the thing, slay ⭐


πŸ’œ SEE ALSO πŸ’œ

nothing listed here in the original, so honestly, this is a solo main character moment 🌸


and that's the whole page, bestie β€” no crumbs left behind πŸ’–

signing off from the PostgreSQL 14.24 documentation, dated 2026, page DBLINK_ERROR_MESSAGE(3) β€” go forth and check your errors πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from