tOn 2009-06-01, Jamie Tufnell <die...@googlemail.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?





-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

Reply via email to