Re: UPDATE w/ subselect doing locking

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: UPDATE w/ subselect doing locking
Дата
Msg-id 20011116014319.C3148@svana.org
обсуждение исходный текст
Ответ на UPDATE w/ subselect doing locking  (David Ford <dford@erisksecurity.com>)
Список pgsql-general
On Wed, Nov 14, 2001 at 02:34:51AM -0500, David Ford wrote:
> bluelist=> UPDATE spamcontrol SET count=foo.count+1 FROM (SELECT count
> FROM spamcontrol WHERE regex='setup fees' FOR UPDATE) as foo;
>
> How do I get it to only update that one row?

What's the problem with:

UPDATE spamcontrol SET count=count+1 WHERE regex='setup fees';

HTH,
--
Martijn van Oosterhout <kleptog@svana.org>
http://svana.org/kleptog/
> Magnetism, electricity and motion are like a three-for-two special offer:
> if you have two of them, the third one comes free.

В списке pgsql-general по дате отправления:

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Idle in transaction ????
Следующее
От: "Jahro"
Дата:
Сообщение: Postgres+Delphi