DBLINK_ERROR_MESSAGE(3)
π DBLINK_ERROR_MESSAGE(3) π
okay so bestie, this is the DBLINK_ERROR_MESSAGE(3) manual page from the PostgreSQL 17.11 Documentation, and it's giving βtiny function, big helper energy.β let's get into it. π
β¨ NAME β¨
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. that's it, that's the whole vibe. it's literally the βwhat went wrong on this connectionβ bestie. π«Ά
π ARGUMENTS π
connnameβ Name of the connection to use.
π RETURN VALUE π
Returns last error message, or OK if there has been no error in this connection. no cap, if everything's chill it says OK. β¨
π₯ 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. π« lowkey sneaky, right?
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. so yeah, do that little check first, iykyk. π―
π EXAMPLES π
SELECT dblink_error_message('dtest1');
and that's the whole page, bestie. source/version and date for the record: PostgreSQL 17.11, 2026. this was DBLINK_ERROR_MESSAGE(3), and yes she ate. mwah. ππ«Ά
π¦ where this page comes from
- opensuse-leap 16.0: postgresql17-docs 17.11-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