Yes, I know that works. I want to figure out how to use SELECT ... FOR
UPDATE with UPDATE because I will have a need to lock these certain rows
and do a bit more than just 'count'.
Thank you,
David
Marc SCHAEFER wrote:
>On Wed, 14 Nov 2001, David Ford wrote:
>
>>bluelist=> UPDATE spamcontrol SET count=foo.count+1 FROM (SELECT count
>>FROM spamcontrol WHERE regex='setup fees' FOR UPDATE) as foo;
>>
>
>You want to increment atomically the count of the row where regex is setup
>fees ?
>
>UPDATE spamcontrol SET count = count + 1 WHERE regex = 'setup fees';
>