Re: libpq++

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: libpq++
Дата
Msg-id 19873.1011048648@sss.pgh.pa.us
обсуждение исходный текст
Ответ на libpq++  ("David Joyner" <d4ljoyn@yahoo.com>)
Список pgsql-interfaces
"David Joyner" <d4ljoyn@yahoo.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


В списке pgsql-interfaces по дате отправления:

Предыдущее
От: "David Joyner"
Дата:
Сообщение: Re: libpq++
Следующее
От: Tom Lane
Дата:
Сообщение: Re: libpq++