Leon Smith <leon(dot)p(dot)smith(at)gmail(dot)com> writes:
> It's not clear to me that this is even a solvable problem without modifying
> the schema to include both a "taken" and a "finished processing" state,
> and then letting elements be re-delievered after a period of time.
You maybe should have a look at PGQ from Skytools before reinventing it.
Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support