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

From Jaime Casanova
Subject Re: DELETE with LIMIT (or my first hack)
Date
Msg-id AANLkTimx08PcEP4gK7YxPpqNQurDMzPqa0ga5MhrskWX@mail.gmail.com
Whole thread Raw
In response to DELETE with LIMIT (or my first hack)  (Daniel Loureiro <loureirorg@gmail.com>)
Responses Re: DELETE with LIMIT (or my first hack)
List pgsql-hackers
On Mon, Nov 29, 2010 at 9:08 PM, Daniel Loureiro <loureirorg@gmail.com> wrote:
>
> 3) change the executor to stop after “n” successful iterations. Is
> this correct ?
>

no. it means you will delete the n first tuples that happen to be
found, if you don't have a WHERE clause that means is very possible
you delete something you don't want to... the correct solution is to
use always try DELETE's inside transactions and only if you see the
right thing happening issue a COMMIT

besides i think this has been proposed and rejected before

--
Jaime Casanova         www.2ndQuadrant.com
Professional PostgreSQL: Soporte y capacitación de PostgreSQL


pgsql-hackers by date:

Previous
From: Itagaki Takahiro
Date:
Subject: Re: dblink versus long connection strings
Next
From: Josh Kupershmidt
Date:
Subject: Re: [GENERAL] column-level update privs + lock table