[GENERAL] PQerrorMessage documentation - Mailing list pgsql-general

From Igor Korot
Subject [GENERAL] PQerrorMessage documentation
Date
Msg-id CA+FnnTym8Z44-MjkwvrEQANBdTiA_zLtvbjW6hg=J+shstc98g@mail.gmail.com
Whole thread Raw
Responses Re: [GENERAL] PQerrorMessage documentation  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-general
Hi, ALL,
[quote]
Nearly all libpq functions will set a message for PQerrorMessage if
they fail. Note that by libpq convention, a nonempty PQerrorMessage
result can consist of 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.
[/quote]

Since there may be multiple errors, I presume that in this case the string
will end with just \0, correct? It's not going to be \0\0 like with MSVC.

Thank you.


pgsql-general by date:

Previous
From: Igor Korot
Date:
Subject: Re: [GENERAL] Compatibility of libpg
Next
From: James Sewell
Date:
Subject: Re: [GENERAL] Generalized pg_stat_statements?