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


From: felix(at)crowfix(dot)com
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: DELETE with JOIN
Date: 2008-08-07 19:12:07
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
On Thu, Aug 07, 2008 at 03:00:35PM -0400, Frank Bax wrote:

> Could you not achieve the same result with a LIMIT on subSELECT and reissue 
> the command until there is nothing to delete?

Oracle has some barbarous alternative to LIMIT.  I find myself
retching over Oracle almost as much as MySQL.

> If you're really desperate; is it possible to alter table 'a' to add column 
> b_id; populate it; delete your rows without a join; then drop the column?

I thought of something similar, but UPDATE has the same limitation as DELETE.

            ... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
     Felix Finch: scarecrow repairman & rocket surgeon / felix(at)crowfix(dot)com
  GPG = E987 4493 C860 246C 3B1E  6477 7838 76E9 182E 8151 ITAR license #4933
I've found a solution to Fermat's Last Theorem but I see I've run out of room o

In response to


pgsql-sql by date

Next:From: Tom LaneDate: 2008-08-07 19:58:51
Subject: Re: DELETE with JOIN
Previous:From: Frank BaxDate: 2008-08-07 19:00:35
Subject: Re: DELETE with JOIN

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