"the primary server: %s",
pchomp(PQerrorMessage(conn->streamConn)))));
}
+ /*
+ * IDENTIFY_SERVER returns 3 columns in 9.3 and earlier, and 4 columns in
+ * 9.4 and onwards.
+ */
if (PQnfields(res) < 3 || PQntuples(res) != 1)
{
int ntuples = PQntuples(res);
(errcode(ERRCODE_PROTOCOL_VIOLATION),
errmsg("invalid response from primary server"),
errdetail("Could not identify system: got %d rows and %d fields, expected %d rows and %d or more fields.",
- ntuples, nfields, 3, 1)));
+ ntuples, nfields, 1, 3)));
}
primary_sysid = pstrdup(PQgetvalue(res, 0, 0));
*primary_tli = pg_strtoint32(PQgetvalue(res, 0, 1));