Re: DELETE with JOIN - Mailing list pgsql-sql

From Alvaro Herrera
Subject Re: DELETE with JOIN
Date
Msg-id 20080807221232.GL4171@alvh.no-ip.org
Whole thread Raw
In response to Re: DELETE with JOIN  (felix@crowfix.com)
Responses Re: DELETE with JOIN
List pgsql-sql
felix@crowfix.com wrote:
> On Thu, Aug 07, 2008 at 03:58:51PM -0400, Tom Lane wrote:
> > felix@crowfix.com writes:
> > > I have tried to do this before and always found a way, usually
> > 
> > >     DELETE FROM a WHERE a.b_id IN (SELECT id FROM b WHERE second_id = ?)
> > 
> > > but I have too many rows, millions, in the IN crowd, ha ha, and it
> > > barfs.
> > 
> > Define "barfs".  That seems like the standard way to do it, and it
> > should work.
> 
> In this case, the first database I tried was Oracle, and it complained
> of too much transactional data; I forget the exact wording now.

I suggest you do not assume that Oracle implementation details apply to
Postgres, because they do not, most of the time.  They certainly don't
in this case.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-sql by date:

Previous
From: Christophe
Date:
Subject: Re: DELETE with JOIN
Next
From: felix@crowfix.com
Date:
Subject: Re: DELETE with JOIN