Re: Questions about update, delete, ctid... - Mailing list pgsql-general

From Tom Lane
Subject Re: Questions about update, delete, ctid...
Date
Msg-id 12943.1154347875@sss.pgh.pa.us
Whole thread Raw
In response to Re: Questions about update, delete, ctid...  ("Florian G. Pflug" <fgp@phlo.org>)
Responses Re: Questions about update, delete, ctid...  ("Florian G. Pflug" <fgp@phlo.org>)
List pgsql-general
"Florian G. Pflug" <fgp@phlo.org> writes:
> I can see how the EPQ machinery can be used to chain forward to the
> correct row to be updated, even if I originally found an older version
> (e.g. by searching for a specific ctid). But for non-"for
> update"-cursors, the newest version of the row returned by fetch could
> be modified such that it would have never been returned by fetch in the
> first place.

Yah, EPQ checks for that ... none of the situations you've mentioned are
any different from the case of an ordinary UPDATE that finds a row
that's been modified since its snapshot was taken.  A cursor would just
make the time window a bit larger.

            regards, tom lane

pgsql-general by date:

Previous
From: "Florian G. Pflug"
Date:
Subject: Re: Questions about update, delete, ctid...
Next
From: Tom Lane
Date:
Subject: Re: Questions about update, delete, ctid...