summaryrefslogtreecommitdiffstats
path: root/doc/src/sgml/man3/dblink_error_message.3
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/sgml/man3/dblink_error_message.3')
-rw-r--r--doc/src/sgml/man3/dblink_error_message.371
1 files changed, 71 insertions, 0 deletions
diff --git a/doc/src/sgml/man3/dblink_error_message.3 b/doc/src/sgml/man3/dblink_error_message.3
new file mode 100644
index 0000000..cefdcd2
--- /dev/null
+++ b/doc/src/sgml/man3/dblink_error_message.3
@@ -0,0 +1,71 @@
+'\" t
+.\" Title: dblink_error_message
+.\" Author: The PostgreSQL Global Development Group
+.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
+.\" Date: 2023
+.\" Manual: PostgreSQL 15.5 Documentation
+.\" Source: PostgreSQL 15.5
+.\" Language: English
+.\"
+.TH "DBLINK_ERROR_MESSAGE" "3" "2023" "PostgreSQL 15.5" "PostgreSQL 15.5 Documentation"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+dblink_error_message \- gets last error message on the named connection
+.SH "SYNOPSIS"
+.sp
+.nf
+dblink_error_message(text connname) returns text
+.fi
+.SH "DESCRIPTION"
+.PP
+\fBdblink_error_message\fR
+fetches the most recent remote error message for a given connection\&.
+.SH "ARGUMENTS"
+.PP
+\fIconnname\fR
+.RS 4
+Name of the connection to use\&.
+.RE
+.SH "RETURN VALUE"
+.PP
+Returns last error message, or
+OK
+if there has been no error in this connection\&.
+.SH "NOTES"
+.PP
+When asynchronous queries are initiated by
+\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
+\fBdblink_is_busy\fR
+or
+\fBdblink_get_result\fR
+should be called prior to
+\fBdblink_error_message\fR, so that any error generated by the asynchronous query will be visible\&.
+.SH "EXAMPLES"
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+SELECT dblink_error_message(\*(Aqdtest1\*(Aq);
+.fi
+.if n \{\
+.RE
+.\}