Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group