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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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-18 15:16:24
Message-ID: 25222.1460992584@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thomas Kellerer <spam_eater(at)gmx(dot)net> writes:
> Jinhua Luo schrieb am 18.04.2016 um 16:47:
>> For trigger, e.g. written in pl/pgsql, each sql command within the
>> function may see more new data beyond the (entry) snapshot of outer
>> command.

> No it will not see "more data")

> It runs in the same _transaction_ as the "firing" command and thus sees
> **exactly** the same data as the triggering statement

No, that's not true: a trigger is a function and what it can see is
determined by the rules of the PL it's written in. Typically a
function that's marked STABLE or IMMUTABLE will see the same snapshot
as the calling query, but a function that's VOLATILE will take a new
snapshot for each query it contains.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Kellerer 2016-04-18 15:53:59 Re: what's the exact command definition in read committed isolation level?
Previous Message Thomas Kellerer 2016-04-18 15:03:28 Re: what's the exact command definition in read committed isolation level?