Re: DELETE with LIMIT (or my first hack) - Mailing list pgsql-hackers

From Daniel Loureiro
Subject Re: DELETE with LIMIT (or my first hack)
Date
Msg-id AANLkTik2AKm5aqRcLNmE7D7O=tHF-B01HiaSnz0ATW_=@mail.gmail.com
Whole thread
In response to Re: DELETE with LIMIT (or my first hack)  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: DELETE with LIMIT (or my first hack)
List pgsql-hackers
to me the key its security - its a anti-DBA-with-lack-of-attention feature. If i forget the "WHERE" statement, I will delete some valid tuples and messed up the bd, but its less-than-worst that exclude all the table. A DBA who never forgot an "WHERE" in an "DELETE" is not an DBA. Just kidding, but this happens often enough.

is there another option to implement this ? Its possible to be done by plugins/extension (in a Firefox browser style) ?

Sds,
--
Daniel Loureiro
------------------------------

2010/11/30 Andrew Dunstan <andrew@dunslane.net>


On 11/30/2010 09:57 AM, Csaba Nagy wrote:

So it is really an ideological thing and not lack of demand or
implementation attempts... I for myself can't write working C code
anyway, so I got my peace with the workaround - I wish you good luck
arguing Tom :-)



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.

As for it being illogical, I don't think it's any more so than
DELETE FROM foo WHERE random() < 0.1;
and you can do that today.

cheers

andrew


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [GENERAL] column-level update privs + lock table
Next
From: Cédric Villemain
Date:
Subject: Re: Instrument checkpoint sync calls