Is what I want possible and if so how?

Поиск
Список
Период
Сортировка
От Joost Kraaijeveld
Тема Is what I want possible and if so how?
Дата
Msg-id 1151923545.6055.40.camel@localhost
обсуждение исходный текст
Ответы Re: Is what I want possible and if so how?  (Douglas McNaught <doug@mcnaught.org>)
Re: [JDBC] Is what I want possible and if so how?  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [JDBC] Is what I want possible and if so how?  (Dave Cramer <pg@fastcrypt.com>)
Список pgsql-general
Hi,

I have a table with events that must be handled by multiple clients. It
does not matter which client handles an event, but no two clients may
handle the same event and an event may only handled once.  A client can
only determine the availability of an event by querying the database.
The access to the table should be queue-like with synchronization.

My idea was that a client should do a "SELECT" on the table and mark the
selected records as "being handled" to avoid double handling.

I have read the manual about "LOCK", "SET TRANSACTION" and "SELECT...FOR
UPDATE", but from what I understand, they cannot prevent a "SELECT" from
another client, based on the "SELECT".

Is there a way to make this possible?

TIA


--
Groeten,

Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
web: www.askesis.nl

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: different sort order in windows and linux version
Следующее
От: David Hoksza
Дата:
Сообщение: query execution time