public inbox for [email protected]  
help / color / mirror / Atom feed
From: Florence Cousin <[email protected]>
To: [email protected]
Subject: Re: For update clause
Date: Wed, 16 Jun 2010 09:58:15 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

Le mardi 15 juin 2010 22:04:06, Bruce Momjian a écrit :
> 
> Wow, that is a confusing double-negative sentence.  I have updated the
> text to be:
> 
>     In addition, rows that satisfied the query conditions as of the
>     query snapshot will be locked, although they will not be returned
>     if they were updated after the snapshot and no longer satisfy the
>     query conditions.
> 
> What it is saying is that SELECT FOR UPDATE will lock all rows that
> match the SELECT query using the current snapshot, but the returned rows
> might be different because the rows were changed after the snapshot was
> taken, and a SELECT FOR UPDATE will return the rows as UPDATE will see
> them, which might not match the SELECT snapshot.  Yeah, it is confusing.

Thank you for the patch and the explanation. It is clear for me now (the rows 
returned are those that would be returned by an UPDATE, that is pretty 
logical).

But I think most of the users will still not understand this, because they do 
not know what a snapshot is, and do not really know how locking works. 

And I managed to understand thank to the explanation, but I think I could not 
understand with the new version of the explanation alone (the fact that rows 
returned are the rows as UPDATE will see them)

Maybe it would be clearer with a longer explanation, or a link to an 
explanation?



view thread (4+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: For update clause
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox