]> begriffs open source - ai-pg/blob - full-docs/txt/contrib-dblink-error-message.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / contrib-dblink-error-message.txt
1
2 dblink_error_message
3
4    dblink_error_message — gets last error message on the named connection
5
6 Synopsis
7
8 dblink_error_message(text connname) returns text
9
10 Description
11
12    dblink_error_message fetches the most recent remote error message for a
13    given connection.
14
15 Arguments
16
17    connname
18           Name of the connection to use.
19
20 Return Value
21
22    Returns last error message, or OK if there has been no error in this
23    connection.
24
25 Notes
26
27    When asynchronous queries are initiated by dblink_send_query, the error
28    message associated with the connection might not get updated until the
29    server's response message is consumed. This typically means that
30    dblink_is_busy or dblink_get_result should be called prior to
31    dblink_error_message, so that any error generated by the asynchronous
32    query will be visible.
33
34 Examples
35
36 SELECT dblink_error_message('dtest1');