Re: DELETE with LIMIT (or my first hack)

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Csaba Nagy <ncslists(at)googlemail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Jaime Casanova <jaime(at)2ndquadrant(dot)com>, Daniel Loureiro <loureirorg(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: DELETE with LIMIT (or my first hack)
Date: 2010-12-01 18:07:11
Message-ID: 4CF68ECF.5020508@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> We need a convincing use case for it. So far the only one that's seemed
> at all convincing to me is the one about deleting in batches. But that
> might be enough.

Queueing. If logless tables are in 9.1, then using PostgreSQL as the
backend for a queue becomes a sensible thing to do. And what is a
"pop" off a queue other than:

DELETE FROM my_queue ORDER BY age LIMIT 1;

For this reason, I think accepting a good patch for DELETE would be
worthwhile even if we don't have UPDATE yet.

--
-- Josh Berkus
PostgreSQL Experts Inc.
http://www.pgexperts.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dmitriy Igrishin 2010-12-01 18:08:49 Re: DELETE with LIMIT (or my first hack)
Previous Message David Fetter 2010-12-01 18:05:15 Re: [HACKERS] Improved JDBC driver part 2