From a788cbfdc406952ec41e34b1df64e65128021312 Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Tue, 7 Jul 2015 18:54:08 +0300 Subject: [PATCH] Oops, PQExpBufferDataBroken doesn't exist before 9.2. My previous back-patching went wrong. --- src/interfaces/libpq/fe-protocol2.c | 2 +- src/interfaces/libpq/fe-protocol3.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 -- 2.40.0