I'm facing what seems like a bug and I've reached a dead end without finding a solution.
I'm executing a script that work on a postgresql table. This script is executed more than once at a time.
The table contains a column called status.
One of the scripts is checking the value on the column status and, if it's different than 1, it should do nothing. If it's 1 it changes its value to the new status (new value can be 1,2,3)
Read "The Locking Clause" in the SELECT command's documentation page and see if that helps.