2 .\" Title: dblink_error_message
3 .\" Author: The PostgreSQL Global Development Group
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
6 .\" Manual: PostgreSQL 18.0 Documentation
7 .\" Source: PostgreSQL 18.0
10 .TH "DBLINK_ERROR_MESSAGE" "3" "2025" "PostgreSQL 18.0" "PostgreSQL 18.0 Documentation"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 dblink_error_message \- gets last error message on the named connection
35 dblink_error_message(text connname) returns text
39 \fBdblink_error_message\fR
40 fetches the most recent remote error message for a given connection\&.
45 Name of the connection to use\&.
49 Returns last error message, or
51 if there has been no error in this connection\&.
54 When asynchronous queries are initiated by
55 \fBdblink_send_query\fR, the error message associated with the connection might not get updated until the server\*(Aqs response message is consumed\&. This typically means that
58 \fBdblink_get_result\fR
59 should be called prior to
60 \fBdblink_error_message\fR, so that any error generated by the asynchronous query will be visible\&.
67 SELECT dblink_error_message(\*(Aqdtest1\*(Aq);