Re: BUG #5906: assertion failure in AtCleanup_Portals
| От | yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi) |
|---|---|
| Тема | Re: BUG #5906: assertion failure in AtCleanup_Portals |
| Дата | |
| Msg-id | 20110303001403.11CB319CEB6@mail.netbsd.org обсуждение исходный текст |
| Ответ на | Re: BUG #5906: assertion failure in AtCleanup_Portals (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: BUG #5906: assertion failure in AtCleanup_Portals
|
| Список | pgsql-bugs |
hi,
> "YAMAMOTO Takashi" <yamt@mwd.biglobe.ne.jp> writes:
>> i got the following with my application, which uses
>> PQsendPrepare+PQsendQueryPrepared for nearly everything
>> including ROLLBACK.
>
> Can't do anything about that without a test case.
>
> regards, tom lane
here's a small test case.
YAMAMOTO Takashi
#include <stdlib.h>
#include <libpq-fe.h>
int
main()
{
PGconn *conn;
PGresult *res;
conn = PQconnectdb("");
if (PQstatus(conn) != CONNECTION_OK) {
exit(1);
}
res = PQprepare(conn, "r", "ROLLBACK", 0, NULL);
if (PQresultStatus(res) != PGRES_COMMAND_OK) {
exit(1);
}
PQclear(res);
res = PQexec(conn, "BEGIN");
if (PQresultStatus(res) != PGRES_COMMAND_OK) {
exit(1);
}
PQclear(res);
res = PQexec(conn, "hoge");
/* a syntax error made the transaction aborted */
PQclear(res);
res = PQexecPrepared(conn, "r", 0, NULL, NULL, NULL, 0);
if (PQresultStatus(res) != PGRES_COMMAND_OK) {
exit(1);
}
PQclear(res);
exit(0);
}
В списке pgsql-bugs по дате отправления: