Re: Deleting prepared statements from libpq. - Mailing list pgsql-hackers

From Jelte Fennema
Subject Re: Deleting prepared statements from libpq.
Date
Msg-id CAGECzQTkShHecFF+EZrm94Lbsu2ej569T=bz+PjMbw9Aiioxuw@mail.gmail.com
Whole thread Raw
In response to Re: Deleting prepared statements from libpq.  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Deleting prepared statements from libpq.
List pgsql-hackers
On Fri, 23 Jun 2023 at 05:59, Michael Paquier <michael@paquier.xyz> wrote:
> [...]
>     res = PQgetResult(conn);
>     if (res == NULL)
> -       pg_fatal("expected NULL result");
> +       pg_fatal("expected non-NULL result");
>
> This should check for the NULL-ness of the result returned for
> PQclosePrepared() rather than changing the behavior of the follow-up
> calls?

To be clear, it didn't actually change the behaviour. I only changed
the error message, since it said the exact opposite of what it was
expecting. I split this minor fix into its own commit now to clarify
that. I think it would even make sense to commit this small patch to
the PG16 branch, since it's a bugfix in the tests (and possibly even
back-patch to others if that's not a lot of work). I changed the error
message to be in line with one from earlier in the test.

I addressed all of your other comments.

Attachment

pgsql-hackers by date:

Previous
From: Konstantin Knizhnik
Date:
Subject: Index range search optimization
Next
From: Ashutosh Bapat
Date:
Subject: Re: Infinite Interval