Re: BUG #5906: assertion failure in AtCleanup_Portals - Mailing list pgsql-bugs

From yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi)
Subject Re: BUG #5906: assertion failure in AtCleanup_Portals
Date
Msg-id 20110303001403.11CB319CEB6@mail.netbsd.org
Whole thread Raw
In response to Re: BUG #5906: assertion failure in AtCleanup_Portals  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #5906: assertion failure in AtCleanup_Portals
List 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 by date:

Previous
From: "Aldo Ribeiro"
Date:
Subject: BUG #5908: PgOleDb 1.0.0.20 returns values without the digits after the dot.
Next
From: "tushar"
Date:
Subject: BUG #5910: Function pg_get_expr throwing error for non superuser