BEGIN Behaviour

From: "Constantin S(dot) Svintsoff" <cs(at)newst(dot)net>
To: pgsql-odbc(at)postgresql(dot)org
Subject: BEGIN Behaviour
Date: 2001-02-13 12:00:19
Message-ID: Pine.BSF.4.21.0102131736560.56545-100000@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc


hello, there!

I think correct behaviour for issuing BEGIN in ODBC is:

All the statements that are issued when autocommit is off should
be executed inside transaction block, because there is no
possibility to determine if particular statement modifies database
state or no. (SELECT can be used to execute stored procedure
that modifies database state, etc. It would be very bad if
changes made by such SELECT will be rolled back if there was
some INSERT/UPDATE/DELETE, etc, before it, and not rolled back
if no).

So I think it would be correct to issue BEGIN in SQLSetConnectAttr what
sets autocommit off, and in SQLEndTran after COMMIT or ROLLBACK.
And issue COMMIT in SQLSetConnectAttr that sets autocommit ON.

P.S. Sorry for my poor English

/Constantin

Browse pgsql-odbc by date

  From Date Subject
Next Message Tom Lane 2001-02-13 14:58:13 Re: [ODBC] RE: 7.1 beta 3 Linux ODBC BEGINBehaviour
Previous Message Dave Page 2001-02-13 11:09:53 RE: [ODBC] RE: 7.1 beta 3 Linux ODBC BEGINBehaviour