"D. Dante Lorenso" <dante(at)lorenso(dot)com> writes:> You can't do it this way because if this select IS successful,> you'll still need to LOCK the row for the update.
That's why you should be using SELECT FOR UPDATE.
regards, tom lane