DBLINK_ERROR_MESSAGE(3)
π NAME π
okay so welcome to DBLINK_ERROR_MESSAGE(3) β this is the little PostgreSQL page that tells you how to grab the last error message from a named connection. Itβs giving βerror receipts, but make it remote.β π
β¨ SYNOPSIS β¨
dblink_error_message(text connname) returns text
π¦ DESCRIPTION π¦
dblink_error_message fetches the most recent remote error message for a given connection. So if your remote connection has been going through it, this is where you go to read the drama. π
πΈ ARGUMENTS πΈ
connnameβ the name of the connection to use. Thatβs the connection whose last error message youβre asking about, bestie. π
π«Ά RETURN VALUE π«Ά
It returns the last error message, or OK if there has been no error in this connection. So OK is literally the βno notes, weβre fineβ response. β¨
π NOTES π
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. Translation: check the async situation first, or the error might still be backstage waiting for its main character moment. ππ«
π EXAMPLES π
SELECT dblink_error_message('dtest1');
made with π from PostgreSQL 15.19 Β· 2026 Β· DBLINK_ERROR_MESSAGE(3)
π¦ where this page comes from
- opensuse-leap 16.0: postgresql15-docs 15.19-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