From f3a0688ace40f012f4de95b7b722fbfbb802bea9 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Mon, 27 Oct 2008 09:42:31 +0000 Subject: Add support for multiple error messages from libpq, by simply appending them after each other (since we already add a newline on each, this makes them multiline). Previously a new error would just overwrite the old one, so for example any error caused when trying to connect with SSL enabled would be overwritten by the error message form the non-SSL connection when using sslmode=prefer. --- doc/src/sgml/libpq.sgml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml index 2e13e1daa4f..0aa134f4cde 100644 --- a/doc/src/sgml/libpq.sgml +++ b/doc/src/sgml/libpq.sgml @@ -1,4 +1,4 @@ - + <application>libpq</application> - C Library @@ -1137,10 +1137,11 @@ PQconninfoOption *PQconninfoParse(const char *conninfo, char **errmsg); Nearly all libpq functions will set a message for PQerrorMessage if they fail. Note that by libpq convention, a nonempty - PQerrorMessage result will include a trailing - newline. The caller should not free the result directly. It will - be freed when the associated PGconn handle is passed - to PQfinish. The result string should not be + PQerrorMessage result can be multiple lines, + and will include a trailing newline. The caller should not free + the result directly. It will be freed when the associated + PGconn handle is passed to + PQfinish. The result string should not be expected to remain the same across operations on the PGconn structure. -- cgit v1.2.3