Re: Assigning data-entry tasks to multiple concurrent clients

From: Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Assigning data-entry tasks to multiple concurrent clients
Date: 2009-06-01 08:55:10
Message-ID: h0051e$llo$5@reversiblemaps.ath.cx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

tOn 2009-06-01, Jamie Tufnell <diesql(at)googlemail(dot)com> wrote:
> --00163646d8e6795c49046b4163e0
> Content-Type: text/plain; charset=ISO-8859-1
> Content-Transfer-Encoding: 7bit
>
> Hi,
>
> I am trying to provide a simple data entry interface to allow multiple
> people to efficiently work through every record in a table and fill in the
> missing values.
>
> The interface is a web application that simply loads up record after record
> until they're all complete.
>
> I want to minimize the possibility of assigning the same record to two
> users.

update records set locked_since = now() where id = (select
id from recored order by locked_since is NOT NULL, locked_since desc
limit 1) returning *

your operators may end up fighting over the last two records,
would that be a bad thing?

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Scott Marlowe 2009-06-01 09:55:44 Re: Assigning data-entry tasks to multiple concurrent clients
Previous Message Jamie Tufnell 2009-06-01 05:02:02 Re: Assigning data-entry tasks to multiple concurrent clients