PQerrorMessage documentation

From: Igor Korot <ikorot01(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: PQerrorMessage documentation
Date: 2017-05-04 01:23:57
Message-ID: CA+FnnTym8Z44-MjkwvrEQANBdTiA_zLtvbjW6hg=J+shstc98g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message James Sewell 2017-05-04 02:28:07 Re: Generalized pg_stat_statements?
Previous Message Igor Korot 2017-05-03 22:06:46 Re: Compatibility of libpg