PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.
dblink_error_message(text connname) returns text
dblink_error_message fetches the most recent remote error message for a given connection.
dblink_error_message
Name of the connection to use.
Returns last error message, or an empty string if there has been no error in this connection.
SELECT dblink_error_message('dtest1');
Read the upstream documentation. For corrections, first check the current version.