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

From jian he
Subject Re: Deleting prepared statements from libpq.
Date
Msg-id CACJufxGWo3++H2L44vwtuA8DJGwN=H+PbE=hemPxgBvNVqMqxQ@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

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?

pgsql-hackers by date:

Previous
From: James Coleman
Date:
Subject: path->param_info only set for lateral?
Next
From: Tom Lane
Date:
Subject: Re: path->param_info only set for lateral?