X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 603749DCD41 for ; Wed, 22 Mar 2006 10:42:33 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 66629-05-4 for ; Wed, 22 Mar 2006 10:42:37 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from samwel.tk (bsamwel.xs4all.nl [82.92.179.183]) by postgresql.org (Postfix) with ESMTP id ACFB09DCC39 for ; Wed, 22 Mar 2006 10:42:30 -0400 (AST) Received: from localhost ([127.0.0.1]) by samwel.tk with esmtp (Exim 4.60) (envelope-from ) id 1FM4Xe-0002De-M1; Wed, 22 Mar 2006 15:42:30 +0100 Message-ID: <4421625A.7030906@samwel.tk> Date: Wed, 22 Mar 2006 15:42:34 +0100 From: Bart Samwel User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: Ludek Finstrle CC: pgsql-odbc@postgresql.org Subject: Re: Future development References: <441AB081.9090901@samwel.tk> <20060322112325.GD6294@soptik.pzkagis.cz> <44214551.5060202@samwel.tk> <20060322142417.GA6999@soptik.pzkagis.cz> In-Reply-To: <20060322142417.GA6999@soptik.pzkagis.cz> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: bart@samwel.tk X-SA-Exim-Scanned: No (on samwel.tk); SAEximRunCond expanded to false X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.063 required=5 tests=[AWL=0.063] X-Spam-Score: 0.063 X-Spam-Level: X-Archive-Number: 200603/140 X-Sequence-Number: 7426 Ludek Finstrle wrote: > Hello > > I copy&paste here second thread which is related to this: > >>> This is backend related. I assume you use autocommit=off. In this >>> case backend doesn't allow next commands after failed one in >>> one transaction. >> I get what autocommit does when I haven't started a transaction, but >> what does "autocommit" mean when I'm inside a manually started transaction? > > When you start transaction manually you have to finish it manually. > I see no difference in ending transactions. ACK. >>> 08.00.0102 driver calls automatic rollback (if I remember it right). >>> Some users voted againist it. And I agreed with them. When programmer >>> manage the transaction he may also manage errors. >> Yes. But that also means that he needs to get a choice on whether to >> continue or not. The 8.01 driver forces the programmer to rollback, >> which is not very nice. > > You have the choice. You could use savepoints (this is the way used by > 7.3 experimental driver). When driver uses savepoints automatically > before each statement it has to be slow down. Of course it will be slightly slower. But I think savepoints are not that slow, their big cost is at rollback time. At least it's nice to have it as an option, as in the 7.3 driver. >>> I see no reason to continue transaction when something in it failed. >>> Transaction may be atomic. All inside is ok or no change happens. >>> It sounds quite odd for me that another RDBMS do it another way. >> Well, on other DBMSes the statements themselves seem to act like small >> transactions themselves. If a single statement fails, you can try and >> finish your transaction in another way, or you can roll it back. Your >> choice. > > Ok. You're right. I have used too strong words. Glad you see things my way. ;-) > Wed, Mar 22, 2006 at 01:38:41PM +0100, Bart Samwel napsal(a): >> Ludek Finstrle wrote: >>>> I for one can't live without the "Level of rollback on errors" feature >>>> of the 7.3 experimental branch. I don't care about which branch is used, >>>> as long as this feature is in there -- the 8.1 branch doesn't work for >>>> me at all. :-/ >>> Could you explain me the "Level of rollback on errors"? I think that >>> when programmer doesn't use autocommit mode he want react on errors >>> himself. >> Like I said in my other message, the 8.01 driver doesn't give me a >> choice in how to react on errors at all: it forces me to rollback the > > It gives you the choice ;-) but not hidden one. You mean I can set savepoints manually. :-) >> complete transaction. I want to have a choice in that. The 7.03 driver >> allows me to set the "Level of rollback on errors" to "Statement", which >> means that only the failed statement is rolled back, and *I* then have >> the choice of whether I want to rollback the remainder of the >> transaction as well, or that I want to continue / try something else. > > Maybe this could be good for writing DB applications for more RDBMS? For portability it would definitely be nice if the driver supports the other RDBMS drivers' behaviour. > Thanks for disscussion (I hope we will continue). You show me another > point of view. I'll keep an eye on the discussion. Pointing it in the right direction can save me a whole lot of work later. :-) --Bart