pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: yamt@mwd.biglobe.ne.jp
To: tgl@sss.pgh.pa.us
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #5906: assertion failure in AtCleanup_Portals
Date: Thu,  3 Mar 2011 00:14:02 +0000 (UTC)
Message-ID: <20110303001403.11CB319CEB6@mail.netbsd.org> (raw)
In-Reply-To: <16798.1299078556@sss.pgh.pa.us>
References: <16798.1299078556@sss.pgh.pa.us>

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);
}



view thread (6+ messages)  latest in thread

Message-ID: <20110303001403.11CB319CEB6@mail.netbsd.org>
Permalink:  ../20110303001403.11CB319CEB6@mail.netbsd.org/
Also on:    postgresql.org/message-id/20110303001403.11CB319CEB6@mail.netbsd.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: yamt@mwd.biglobe.ne.jp, tgl@sss.pgh.pa.us
  Subject: Re: BUG #5906: assertion failure in AtCleanup_Portals
  In-Reply-To: <20110303001403.11CB319CEB6@mail.netbsd.org>
  References: <16798.1299078556@sss.pgh.pa.us> <20110303001403.11CB319CEB6@mail.netbsd.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox