DBLINK_ERROR_MESSAGE(3)
π 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 bydblink_send_query, the error message associated with the connection might not get updated until the server's response message is consumed. this typically means thatdblink_is_busyordblink_get_resultshould be called prior todblink_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
- opensuse-leap 16.0: postgresql18-docs 18.6-160000.1.1 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms