[fpc-devel] Implicit Transactions Postgres
Michael Van Canneyt
michael at freepascal.org
Tue Nov 25 09:47:57 CET 2014
On Mon, 24 Nov 2014, Chris Dryburgh wrote:
> Found this bug report from 2010 on using implicit transactions in PostgreSQL.
> As far as I can tell nothing has happened since. Using the
> TSQLTransaction.Action setting looks like a good approach to implementing
> implicit transactions. It would mean warning users about setting action as it
> currently does nothing and is likely ignored by many programmers.
>
> http://bugs.freepascal.org/view.php?id=17713
>
> There is another reason to use implicit transactions. When creating or
> dropping a database the query must be run in a implicit transaction.
> Currently createDB and dropDB use implicit transactions but do not allow for
> options beyond the required database name.
>
> Implementing implicit transactions will compliment the transaction patch from
> Michael. His patch allows automatically opened transactions to be closed
> without closing datasets which allows for user managed transaction handling.
Please check the sources, I have additionally implemented toUseImplicit.
I tested it using postgres (as firebird does not support it).
Michael.
More information about the fpc-devel
mailing list