Re: Nested Transactions, Abort All

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Nested Transactions, Abort All
Дата
Msg-id 200407101336.58954.josh@agliodbs.com
обсуждение исходный текст
Ответ на Re: Nested Transactions, Abort All  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: Nested Transactions, Abort All
Re: Nested Transactions, Abort All
Список pgsql-hackers
Bruce,

> Well, Oracle doesn't suppor RELEASE, so we are matching the standard but
> perhaps not allowing easy migration from Oracle.

Well, that's Oracle's problem.  Considering the amount of influence they had 
over the standard, there's no excuse for their syntax.     Also, if someone 
converts and Oracle script which does not do  RELEASE, it's still ok with us; 
they just end up nesting multiple levels and not "releasing" until the main 
transaction is committed.

> Don't we see the error from libpq PQexec() return value and other
> interfaces?  

As far as I know, DBD::pg does not at this time; it detects an error but does 
not return the SQLSTATE, and I'm *sure* that PHP 4 does not.  I'm sure there 
are other interfaces in the same boat.   And nobody has answered the question 
of what SQLSTATE ranges indicate an abort state as opposed to something else 
-- I get the feeling that this is not at all defined.

> Are you saying how do we detect a failure from a psql
> script?

Right.  There are applications out there:  shell scripts, ODBC applications, 
etc., which are unlikely to *ever* have the ability to read states from 
libpq.  These applications need to have the ability to detect an abort *by 
query* ala T-SQL (e.g. the @@ERROR system variable), so that they can issue 
the proper ROLLBACKs.

-- 
Josh Berkus
Aglio Database Solutions
San Francisco


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Nested Transactions, Abort All
Следующее
От: Dennis Bjorklund
Дата:
Сообщение: Re: Nested Transactions, Abort All