Re: Re: what's the exact command definition in read committed isolation level?

From: Jinhua Luo <luajit(dot)io(at)gmail(dot)com>
To: Thomas Kellerer <spam_eater(at)gmx(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Re: what's the exact command definition in read committed isolation level?
Date: 2016-04-19 03:41:23
Message-ID: CAAc9rOw6ULFL8K90CLJBx-brq-SO7cH13U+URi6JxUpTaowf+g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> Does that mean a VOLATILE function runs in a different transaction?

No, all statements triggered by the outer statement is within the same
transaction. If the trigger fails (without trapping the error), all
affects including changes by outer statement would be rollback.

> And does that mean it will see committed data that the calling statement
> would not see?

Yes, that's what I said. The trigger is special, each statement within
it get new snapshot so it would see data from all committed
transactions up to its execution instant. But that doesn't mean the
trigger runs in different transaction.

Please check my example above, and try it yourself.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Nikhil 2016-04-19 04:51:15 BDR replication slots
Previous Message John R Pierce 2016-04-19 01:40:11 Re: How do BEGIN/COMMIT/ABORT operate in a nested SPI query?