Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id EEA576328F1 for ; Mon, 1 Jun 2009 05:56:58 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 13711-02 for ; Mon, 1 Jun 2009 05:56:57 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from titania.wxnz.net (titania.wxnz.net [58.28.4.13]) by mail.postgresql.org (Postfix) with ESMTP id 989426323F0 for ; Mon, 1 Jun 2009 05:56:57 -0300 (ADT) Received: from gonzo (ip-118-90-133-204.xdsl.xnet.co.nz [118.90.133.204]) by titania.wxnz.net (Postfix) with ESMTP id BAE6F1DB81DB for ; Mon, 1 Jun 2009 20:56:53 +1200 (NZST) Received: from news by gonzo with local (Exim 4.69) (envelope-from ) id 1MB3IU-00068z-FM for pgsql-sql@postgresql.org; Mon, 01 Jun 2009 20:55:10 +1200 To: pgsql-sql@postgresql.org Path: not-for-mail From: Jasen Betts Newsgroups: gmane.comp.db.postgresql.sql Subject: Re: Assigning data-entry tasks to multiple concurrent clients Date: 1 Jun 2009 08:55:10 GMT Organization: Dis (not Dat) Organisation Lines: 27 Message-ID: References: NNTP-Posting-Host: localhost Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: reversiblemaps.ath.cx 1243846510 22200 127.0.0.1 (1 Jun 2009 08:55:10 GMT) X-Face: ?)Aw4rXwN5u0~$nqKj`xPz>xHCwgi^q+^?Ri*+R(&uv2=E1Q0Zk(>h!~o2ID@6{uf8s; a +M[5[U[QT7xFN%^gR"=tuJw%TXXR'Fp~W; (T"1(739R%m0Yyyv*gkGoPA.$b,D.w:z+<'"=-lVT?6 {T?=R^:W5g|E2#EhjKCa+nt":4b}dU7GYB*HBxn&Td$@f%.kl^:7X8rQWd[NTc"P"u6nkisze/Q; 8 "9Z{peQF,w)7UjV$c|RO/mQW/NMgWfr5*$-Z%u46"/00mx-,\R'fLPe.)^ User-Agent: slrn/pre1.0.0-2 (Linux) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200906/4 X-Sequence-Number: 32609 tOn 2009-06-01, Jamie Tufnell 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?