Re: what's the exact command definition in read committed isolation level? - Mailing list pgsql-general

From Thomas Kellerer
Subject Re: what's the exact command definition in read committed isolation level?
Date
Msg-id nf2vuo$vab$1@ger.gmane.org
Whole thread Raw
In response to Re: Re: what's the exact command definition in read committed isolation level?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Re: what's the exact command definition in read committed isolation level?
List pgsql-general
Tom Lane schrieb am 18.04.2016 um 17:16:
>>> 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.

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

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








pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Re: what's the exact command definition in read committed isolation level?
Next
From: Brent Wood
Date:
Subject: Re: $foo $bar is BAD