BEGIN Behaviour

Поиск
Список
Период
Сортировка
От Constantin S. Svintsoff
Тема BEGIN Behaviour
Дата
Msg-id Pine.BSF.4.21.0102131736560.56545-100000@localhost
обсуждение исходный текст
Список 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


В списке pgsql-odbc по дате отправления:

Предыдущее
От: Dave Page
Дата:
Сообщение: RE: RE: [INTERFACES] 7.1 beta 3 Linux ODBC BEGINBehaviour
Следующее
От: Tom Lane
Дата:
Сообщение: Re: RE: [INTERFACES] 7.1 beta 3 Linux ODBC BEGINBehaviour