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_0_23~83 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7a858f7bf47d88faf9a7b52194c939bb1477049e;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 6824b6d6bc..3ace6a6290 100644 --- a/src/interfaces/libpq/fe-protocol2.c +++ b/src/interfaces/libpq/fe-protocol2.c @@ -888,7 +888,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 e314ab0a52..850d84d5ab 100644 --- a/src/interfaces/libpq/fe-protocol3.c +++ b/src/interfaces/libpq/fe-protocol3.c @@ -877,7 +877,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