Re: Deleting prepared statements from libpq.

From: Jelte Fennema <me(at)jeltef(dot)nl>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Dmitry Igrishin <dmitigr(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
Subject: Re: Deleting prepared statements from libpq.
Date: 2023-06-19 09:46:58
Message-ID: CAGECzQRXFdZkyxjOTKSER8140ioq5c1HZUURxozC8n_yR9WauQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 19 Jun 2023 at 04:52, jian he <jian(dot)universality(at)gmail(dot)com> wrote:
> > /* Now that it's closed we should get an error when describing */
> > res = PQdescribePortal(conn, "cursor_one");
> > if (PQresultStatus(res) != PGRES_FATAL_ERROR)
> > pg_fatal("expected COMMAND_OK, got %s", PQresStatus(PQresultStatus(res)));
> should it be "if (PQresultStatus(res) == PGRES_FATAL_ERROR)" ?

The check is correct, but the fatal message was incorrect here. We're
intentionally expecting an error here, because that's the easiest way
to see that the portal was closed.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrey M. Borodin 2023-06-19 09:47:40 Re: Bypassing shared_buffers
Previous Message Jelte Fennema 2023-06-19 09:44:52 Re: Deleting prepared statements from libpq.