Fix incorrect error message in libpq_pipeline
authorMichael Paquier <[email protected]>
Fri, 23 Jun 2023 08:49:07 +0000 (17:49 +0900)
committerMichael Paquier <[email protected]>
Fri, 23 Jun 2023 08:49:07 +0000 (17:49 +0900)
One of the tests for the pipeline mode with portal description expects a
non-NULL PQgetResult, but used an incorrect error message on failure,
telling that PQgetResult being NULL was the expected result.

Author: Jelte Fennema
Discussion: https://postgr.es/m/CAGECzQTkShHecFF+EZrm94Lbsu2ej569T=bz+PjMbw9Aiioxuw@mail.gmail.com
Backpatch-through: 14

src/test/modules/libpq_pipeline/libpq_pipeline.c

index f5b4d4d1ff24f671f295fe1cfb78c21ab6eb8299..1933b078ebfe7a0b13f345f684816ac07752a05b 100644 (file)
@@ -959,7 +959,7 @@ test_prepared(PGconn *conn)
        pg_fatal("pipeline sync failed: %s", PQerrorMessage(conn));
    res = PQgetResult(conn);
    if (res == NULL)
-       pg_fatal("expected NULL result");
+       pg_fatal("PQgetResult returned null");
    if (PQresultStatus(res) != PGRES_COMMAND_OK)
        pg_fatal("expected COMMAND_OK, got %s", PQresStatus(PQresultStatus(res)));