Bug #708: PgTransaction class is broken since 7.2 - Mailing list pgsql-bugs

From pgsql-bugs@postgresql.org
Subject Bug #708: PgTransaction class is broken since 7.2
Date
Msg-id 20020711094326.82401475C2A@postgresql.org
Whole thread Raw
Responses Re: Bug #708: PgTransaction class is broken since 7.2
List pgsql-bugs
Piotr Klaban (makler@man.torun.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

pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Bug #706: Wrong shlib flag for GCC compilation on Solaris
Next
From: Andrew Kohlsmith
Date:
Subject: pg_dumpall forces plain text format