From: Bart Samwel <bart@samwel.tk>
To: Ludek Finstrle <luf@pzkagis.cz>
Cc: pgsql-odbc@postgresql.org
Subject: Re: Future development
Date: Wed, 22 Mar 2006 15:42:34 +0100
Message-ID: <4421625A.7030906@samwel.tk> (raw)
In-Reply-To: <20060322142417.GA6999@soptik.pzkagis.cz>
References: <E7F85A1B5FF8D44C8A1AF6885BC9A0E4011C9594@ratbert.vale-housing.co.uk>
<441AB081.9090901@samwel.tk>
<20060322112325.GD6294@soptik.pzkagis.cz>
<44214551.5060202@samwel.tk>
<20060322142417.GA6999@soptik.pzkagis.cz>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: bart@samwel.tk, luf@pzkagis.cz
Subject: Re: Future development
In-Reply-To: <4421625A.7030906@samwel.tk>
References: <E7F85A1B5FF8D44C8A1AF6885BC9A0E4011C9594@ratbert.vale-housing.co.uk> <441AB081.9090901@samwel.tk> <20060322112325.GD6294@soptik.pzkagis.cz> <44214551.5060202@samwel.tk> <20060322142417.GA6999@soptik.pzkagis.cz> <4421625A.7030906@samwel.tk>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox