Search Postgresql Archives

Re: COMMIT IN STORED PROCEDURE WHILE IN A LOOP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bryn Llewellyn <bryn@xxxxxxxxxxxx> writes:
> xof@xxxxxxxxxxxx wrote:
>> You can commit in a loop, but not in BEGIN / END block that has an exception handler: that creates a subtransaction for the duration of the BEGIN / END.

> This surprised me when I first started to use PG (after all those years
> with ORCL).

Really?  BEGIN with an exception block is a subtransaction because it's
defined to roll back to the database state as of the start of the block
if an exception occurs.  COMMIT in the middle fundamentally conflicts
with that, I should think.  Does Oracle interpret that differently?

			regards, tom lane






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux