[Devel] postgres problem - request for comments

Bogdan-Andrei Iancu bogdan at voice-system.ro
Tue Sep 13 16:38:56 CEST 2005


Hi Klaus,

based on simplicity (as usage) and consistency (with mysql module), I 
would say solution 2 - but actually this should be the choice of the 
implementer :)

regards,
bogdan

Klaus Darilion wrote:

> Hi!
>
> I discovered a problem in the postgres module. Every 
> insert/update/delete will be done in a transaction:
>
>   1. begin_transaction
>   2. submit_query
>   3. commit_transaction
>
> If the query fails, the commit is never sent to postgres (nor a 
> rollback). thus the transaction is still running and the next time the 
> database connection is used, the begin_transaction fails nad a new db 
> connection will be established.
>
> There are 2 solutions:
>
> - fetch the error in submit_query and send a rollback
>
> - remove the transaction: no begin_transaction and commit_transaction,
>   only a submit_query
>
> As there is always only one query in the transaction I might be safe 
> to remove the transaction stuff (as in the mysql module)
>
> regards
> klaus
>
> _______________________________________________
> Devel mailing list
> Devel at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/devel
>




More information about the Devel mailing list