Re: Deleting prepared statements from libpq.
От | jian he |
---|---|
Тема | Re: Deleting prepared statements from libpq. |
Дата | |
Msg-id | CACJufxGWo3++H2L44vwtuA8DJGwN=H+PbE=hemPxgBvNVqMqxQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Deleting prepared statements from libpq. (Michael Paquier <michael@paquier.xyz>) |
Ответы |
Re: Deleting prepared statements from libpq.
|
Список | pgsql-hackers |
now it works.
>
> /* 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?
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?
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 по дате отправления: