[fpc-devel] Implicit Transactions Postgres

Michael Van Canneyt michael at freepascal.org
Tue Nov 25 17:08:10 CET 2014



On Tue, 25 Nov 2014, Chris Dryburgh wrote:

> On 25/11/14 03:47 AM, Michael Van Canneyt wrote:
>> 
>> 
>> 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.
>> _______________________________________________
>> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
>> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
> It looks like implicit transaction code went in a couple of days ago. Seams 
> to only apply to Postgres

And MySQL also.

Michael.



More information about the fpc-devel mailing list