Re: Future development

From: Ludek Finstrle <luf(at)pzkagis(dot)cz>
To: Bart Samwel <bart(at)samwel(dot)tk>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Future development
Date: 2006-03-22 14:24:17
Message-ID: 20060322142417.GA6999@soptik.pzkagis.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

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.

> >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.

> >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.

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.

> 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?

Thanks for disscussion (I hope we will continue). You show me another
point of view.

Regards,

Luf

In response to

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Ludek Finstrle 2006-03-22 14:35:31 Re: Future versions of psqlODBC
Previous Message Lothar Behrens 2006-03-22 13:57:38 Compiling psqlodbc REL-07_03_ENHANCED and 07.03.260