From: Heikki Linnakangas Date: Tue, 7 Jul 2015 15:54:08 +0000 (+0300) Subject: Oops, PQExpBufferDataBroken doesn't exist before 9.2. X-Git-Tag: REL9_1_19~92 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a788cbfdc406952ec41e34b1df64e65128021312;p=postgresql Oops, PQExpBufferDataBroken doesn't exist before 9.2. My previous back-patching went wrong. --- diff --git a/src/interfaces/libpq/fe-protocol2.c b/src/interfaces/libpq/fe-protocol2.c index 365e7525d7..fce0bb9b36 100644 --- a/src/interfaces/libpq/fe-protocol2.c +++ b/src/interfaces/libpq/fe-protocol2.c @@ -953,7 +953,7 @@ pqGetErrorNotice2(PGconn *conn, bool isError) pqClearAsyncResult(conn); conn->result = res; resetPQExpBuffer(&conn->errorMessage); - if (res && !PQExpBufferDataBroken(workBuf) && res->errMsg) + if (res && !PQExpBufferBroken(&workBuf) && res->errMsg) appendPQExpBufferStr(&conn->errorMessage, res->errMsg); else printfPQExpBuffer(&conn->errorMessage, diff --git a/src/interfaces/libpq/fe-protocol3.c b/src/interfaces/libpq/fe-protocol3.c index 78ad5ddd9b..44d27b623e 100644 --- a/src/interfaces/libpq/fe-protocol3.c +++ b/src/interfaces/libpq/fe-protocol3.c @@ -887,7 +887,7 @@ pqGetErrorNotice3(PGconn *conn, bool isError) res->errMsg = pqResultStrdup(res, workBuf.data); pqClearAsyncResult(conn); conn->result = res; - if (PQExpBufferDataBroken(workBuf)) + if (PQExpBufferBroken(&workBuf)) printfPQExpBuffer(&conn->errorMessage, libpq_gettext("out of memory")); else