DBLINK_ERROR_MESSAGE(3)

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

πŸ’– NAME πŸ’–

okay bestie, this is DBLINK_ERROR_MESSAGE(3) β€” the PostgreSQL 18.6 documentation page for the function that gets the last error message on the named connection. literally the whole name vibe is: dblink_error_message β€” gets last error message on the named connection. πŸ’…

✨ SYNOPSIS ✨

dblink_error_message(text connname) returns text

πŸ¦‹ DESCRIPTION πŸ¦‹

dblink_error_message fetches the most recent remote error message for a given connection. it's giving "hey, what went wrong on this connection?" energy. πŸ’–

πŸŽ€ ARGUMENTS πŸŽ€

  • connname β€” the name of the connection to use. that's it, that's the argument. periodt. πŸ’…

🌸 RETURN VALUE 🌸

It returns the last error message, or OK if there has been no error in this connection. so if everything's been chill, you get OK, and if not, you get the error message. no cap. 🫢

πŸ‘‘ NOTES πŸ‘‘

⚠️ bestie, listen up: 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. this typically means that dblink_is_busy or dblink_get_result should be called prior to dblink_error_message, so that any error generated by the asynchronous query will be visible. iykyk. πŸ’€

🌈 EXAMPLES 🌈

like, check it:

SELECT dblink_error_message('dtest1');

and that's the whole page, bestie! this was DBLINK_ERROR_MESSAGE(3) from PostgreSQL 18.6, dated 2026. mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from