Is what I want possible and if so how?

From: Joost Kraaijeveld <J(dot)Kraaijeveld(at)Askesis(dot)nl>
To: pgsql-jdbc(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: Is what I want possible and if so how?
Date: 2006-07-03 10:45:45
Message-ID: 1151923545.6055.40.camel@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-jdbc

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Hoksza 2006-07-03 10:53:53 query execution time
Previous Message ProAce 2006-07-03 08:39:06 High-Availability Question

Browse pgsql-jdbc by date

  From Date Subject
Next Message Douglas McNaught 2006-07-03 11:54:24 Re: Is what I want possible and if so how?
Previous Message Dave Cramer 2006-07-03 10:09:19 Re: Anyone using Eclipse DTP with postgreSQL?