DBLINK_ERROR_MESSAGE(3)
π DBLINK_ERROR_MESSAGE(3) π
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
- opensuse-leap 16.0: postgresql14-docs 14.24-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