Re: Deleting prepared statements from libpq.

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Jelte Fennema <me(at)jeltef(dot)nl>, 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 02:52:09
Message-ID: CACJufxGWo3++H2L44vwtuA8DJGwN=H+PbE=hemPxgBvNVqMqxQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

now it works.

/src/test/modules/libpq_pipeline/libpq_pipeline.c
>
> /* 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)" ?

Similarly the following line should also change?

> res = PQdescribePrepared(conn, "select_one");
> if (PQresultStatus(res) != PGRES_FATAL_ERROR)
> pg_fatal("expected FATAL_ERROR, got %s", PQresStatus(PQresultStatus(res)));

typo, unnecessary "portal." in the following sentence?
"portalName can be "" or NULL to reference the unnamed portal, it is
fine if no portal exists with this name. portal. On success, a PGresult
with status PGRES_COMMAND_OK is returned."

"Also, although there is no libpq function for deleting a prepared
statement, the SQL DEALLOCATE statement can be used for that purpose."
Now the PQclosePrepared has the same use as DEALLOCATE, maybe the above
sentence should be changed?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2023-06-19 02:57:37 Re: path->param_info only set for lateral?
Previous Message James Coleman 2023-06-19 02:36:24 path->param_info only set for lateral?