1DBLINK_ERROR_MESSAGE(3) PostgreSQL 12.2 Documentation DBLINK_ERROR_MESSAGE(3)
2
3
4
6 dblink_error_message - gets last error message on the named connection
7
9 dblink_error_message(text connname) returns text
10
12 dblink_error_message fetches the most recent remote error message for a
13 given connection.
14
16 connname
17 Name of the connection to use.
18
20 Returns last error message, or OK if there has been no error in this
21 connection.
22
24 When asynchronous queries are initiated by dblink_send_query, the error
25 message associated with the connection might not get updated until the
26 server's response message is consumed. This typically means that
27 dblink_is_busy or dblink_get_result should be called prior to
28 dblink_error_message, so that any error generated by the asynchronous
29 query will be visible.
30
32 SELECT dblink_error_message('dtest1');
33
34
35
36PostgreSQL 12.2 2020 DBLINK_ERROR_MESSAGE(3)