BUG #18960: Mistake in test test_simple_pipeline (libpq_pipeline.c) - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #18960: Mistake in test test_simple_pipeline (libpq_pipeline.c)
Date
Msg-id 18960-09cd4a5100152e58@postgresql.org
Whole thread Raw
Responses Re: BUG #18960: Mistake in test test_simple_pipeline (libpq_pipeline.c)
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      18960
Logged by:          Dmitry Kovalenko
Email address:      d.kovalenko@postgrespro.ru
PostgreSQL version: 18beta1
Operating system:   any
Description:

Hello,
Please look at these test lines in
src/test/modules/libpq_pipeline/libpq_pipeline.c 1657-1662:

https://github.com/postgres/postgres/blob/c2e2589ab969eb802493191c79de844bf7dc3a6e/src/test/modules/libpq_pipeline/libpq_pipeline.c#L1657-L1662
---
        PQclear(res);
        res = NULL;
        if (PQgetResult(conn) != NULL)
                pg_fatal("PQgetResult returned something extra after
pipeline end: %s",
                                 PQresStatus(PQresultStatus(res)));
---
You forgot to assign res:
---
        PQclear(res);
        res = NULL;
        if ((res = PQgetResult(conn)) != NULL)
                pg_fatal("PQgetResult returned something extra after
pipeline end: %s",
                                 PQresStatus(PQresultStatus(res)));
---
Thanks&Regards,
Dmitry Kovalenko
PostgresPro, Russia.


pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #18959: Name collisions of expression indexes during parallel Index creations on a pratitioned table.
Next
From: "David G. Johnston"
Date:
Subject: Re: PostgreSQL 17 Service Running but Not Listening on Network Port on Windows