mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-08-31 10:27:21 +02:00
Fix documentation for dblink_error_message() return value
The dblink documentation claims that an empty string is returned if there has been no error, however OK is actually returned in that case. Also, clarify that an async error may not be seen unless dblink_is_busy() or dblink_get_result() have been called first. Backpatch to all supported branches. Reported-by: realyota Backpatch-through: 9.4 Discussion: https://postgr.es/m/153371978486.1298.2091761143788088262@wrigleys.postgresql.org
This commit is contained in:
parent
4eca1905d3
commit
7f39f03441
@ -1165,11 +1165,25 @@ dblink_error_message(text connname) returns text
|
|||||||
<title>Return Value</title>
|
<title>Return Value</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Returns last error message, or an empty string if there has been
|
Returns last error message, or <literal>OK</literal> if there has been
|
||||||
no error in this connection.
|
no error in this connection.
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Notes</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
When asynchronous queries are initiated by
|
||||||
|
<function>dblink_send_query</function>, the error message associated with
|
||||||
|
the connection might not get updated until the server's response message
|
||||||
|
is consumed. This typically means that <function>dblink_is_busy</function>
|
||||||
|
or <function>dblink_get_result</function> should be called prior to
|
||||||
|
<function>dblink_error_message</function>, so that any error generated by
|
||||||
|
the asynchronous query will be visible.
|
||||||
|
</para>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Examples</title>
|
<title>Examples</title>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user