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

Re: DELETE with LIMIT (or my first hack)

From: Jaime Casanova <jaime(at)2ndquadrant(dot)com>
To: Daniel Loureiro <loureirorg(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: DELETE with LIMIT (or my first hack)
Date: 2010-11-30 02:33:56
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Mon, Nov 29, 2010 at 9:08 PM, Daniel Loureiro <loureirorg(at)gmail(dot)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
Professional PostgreSQL: Soporte y capacitación de PostgreSQL

In response to


pgsql-hackers by date

Next:From: Josh KupershmidtDate: 2010-11-30 02:37:10
Subject: Re: [GENERAL] column-level update privs + lock table
Previous:From: Itagaki TakahiroDate: 2010-11-30 02:16:51
Subject: Re: dblink versus long connection strings

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