Re: Deleting prepared statements from libpq.
jian he <jian.universality@gmail.com>
From: jian he <jian.universality@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Jelte Fennema <me@jeltef.nl>, Dmitry Igrishin <dmitigr@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>, Daniele Varrazzo <daniele.varrazzo@gmail.com>
Date: 2023-06-19T02:52:09Z
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?
Commits
-
libpq: Add support for Close on portals and statements
- 28b572656184 17.0 landed
-
Fix incorrect error message in libpq_pipeline
- 451ca5c1e699 14.9 landed
- 4fd633df5080 15.4 landed
- f69a7f08fd01 16.0 landed