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: http://git.ipfire.org/?a=commitdiff_plain;h=7a858f7bf47d88faf9a7b52194c939bb1477049e;p=thirdparty%2Fpostgresql.git 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 6824b6d6bc0..3ace6a6290a 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 e314ab0a526..850d84d5abd 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