The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/10/static/contrib-dblink-error-message.html Description:
Documentation says: Return Value Returns last error message, or an empty string if there has been no error in this connection. Which is invalid. Actually it returns 'OK' string if no error was raised. Secondly dblink_is_busy must be first called to make dblink_error_message returns an error message. (Tested on 9.6.9)