Re: libpq++

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David Joyner" <d4ljoyn(at)yahoo(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: libpq++
Date: 2002-01-14 22:50:48
Message-ID: 19873.1011048648@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

"David Joyner" <d4ljoyn(at)yahoo(dot)com> writes:
> I recently got the latest source from cvs. I think there's a bug in
> pgtransdb.cc. The pgCommitted flag will never be true after the implicit
> BeginTransaction called by creating a PgCursor.

This code is pretty grotty, but that particular issue I don't think is a
problem. AFAICS, since a PgTransaction object opens its own database
connection (yipes!), the only thing ever done in a PgCursor's
transaction will be to create and read from the cursor. So whether we
commit or abort hardly matters.

The real bletcherousness is the overhead of establishing a separate
connection for each transaction.

Fixing this would probably entail a wholesale redesign of PgCursor,
PgTransaction, and friends, and would break any applications that are
using them successfully :-(

There is someone working on a brand-new C++ interface library which
perhaps will avoid all the mistakes that were made in libpq++. You
might want to pitch in with that work. Check the recent archives
for (I think) libpqxx.

regards, tom lane

In response to

  • libpq++ at 2002-01-09 14:01:33 from David Joyner

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message David Joyner 2002-01-14 23:15:39 Re: libpq++
Previous Message David Siebert 2002-01-14 22:50:25 Notify