Re: Triggered Data Change check - Mailing list pgsql-hackers

From Hiroshi Inoue
Subject Re: Triggered Data Change check
Date
Msg-id 3BEF44CB.944BB1E4@tpf.co.jp
Whole thread Raw
In response to Re: Triggered Data Change check  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Responses Re: Triggered Data Change check
List pgsql-hackers
Tom Lane wrote:
> 
> Hiroshi Inoue <Inoue@tpf.co.jp> writes:
> > Strictly speaking MVCC is only for read-only queries.
> > Even under MVCC, update, delete and select .. for update have
> > to see the newest tuples.
> 
> True.  But my point is that we already have mechanisms to deal with
> that set of issues; the trigger code shouldn't concern itself with
> the problem.

You are saying 
> Therefore we don't need any explicit test for triggered data
> change. 

ISTM your point is on the following.

> Functions can run new commands that get new command ID numbers within
> the current transaction --- but on return from the function, the current
> command number is restored.  I believe rows inserted by such a function
> would look "in the future" to us at the outer command, and would be
> ignored.

My point is why we could ignore the (future) changes. 

regards,
Hiroshi Inoue


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Triggered Data Change check
Next
From: Bruce Momjian
Date:
Subject: Re: [patch] helps fe-connect.c handle -EINTR more gracefully