Re: Bug #708: PgTransaction class is broken since 7.2

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: makler(at)man(dot)torun(dot)pl, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug #708: PgTransaction class is broken since 7.2
Date: 2002-07-11 16:41:24
Message-ID: 200207111641.g6BGfOx26890@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


OK, would you send us a correcting patch? Thanks.

---------------------------------------------------------------------------

pgsql-bugs(at)postgresql(dot)org wrote:
> Piotr Klaban (makler(at)man(dot)torun(dot)pl) reports a bug with a severity of 2
> The lower the number the more severe it is.
>
> Short Description
> PgTransaction class is broken since 7.2
>
> Long Description
> Hi,
>
> You have introduced the patch
> http://www.geocrawler.com/archives/3/105/2001/2/0/5248369/
> that broke my pg2xbase C++ utility, because
> I can not COMMIT the transaction. Before the patch
> it works exactly as it is described in the pgtransdb.h file:
>
> // This is the database access class that keeps an open
> // transaction block during its lifetime. The block is ENDed when
> // the object is destroyed.
>
> But it is not true now. There is a private variable called
> pgCommitted that is set to false in protected method BeginTransaction()
> When I delete PgTransaction object - transaction is ABORTed.
> I can not use EndTransaction() protected method in my C++ file
> (gcc 3.0.3 complains).
>
> Maybe both methods should be public.
> Now I use PgDatabase object with two query calls BEGIN ... END
> it is safer.
>
> Best regards.
>
>
> Sample Code
>
>
> No file was uploaded with this report
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message David Busby 2002-07-11 22:05:56 postgres.h MACRO issues
Previous Message grant 2002-07-11 16:23:05 Re: pg_dumpall forces plain text format