Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 8BBE64765F6 for ; Mon, 16 Sep 2002 09:55:34 -0400 (EDT) Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by postgresql.org (Postfix) with ESMTP id 1D6FD476591 for ; Mon, 16 Sep 2002 09:55:32 -0400 (EDT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id g8G43Wr27435; Mon, 16 Sep 2002 00:03:32 -0400 (EDT) From: Bruce Momjian Message-Id: <200209160403.g8G43Wr27435@candle.pha.pa.us> Subject: Re: Table alias in DELETE statements In-Reply-To: <20020914140726.Y14554-100000@houston.familyhealth.com.au> To: Christopher Kings-Lynne Date: Mon, 16 Sep 2002 00:03:32 -0400 (EDT) Cc: Hanno Wiegard , pgsql-sql@postgresql.org X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/173 X-Sequence-Number: 9450 TODO has: * Allow DELETE to handle table aliases for self-joins [delete] --------------------------------------------------------------------------- Christopher Kings-Lynne wrote: > On the several occasions I've tried using table aliases in delete > statements, it hasn't worked. > > Chris > > On Fri, 13 Sep 2002, Hanno Wiegard wrote: > > > Hi, > > > > I've already checked the mailing archive but found nothing about > > problems with the DELETE statement and table alias but it's not > > mentioned in the docs. So the question for me is whether it is possible > > to use a table alias in a DELETE statement or not, e.g. > > DELETE FROM foo f WHERE f.ID > 3000 (more complicated cases in reality > > and I really need the alias because the SQL is generated automaically > > by a tool)? > > > > Thanks, > > Hanno Wiegard > > > > > > > > ______________________________________________________________________________ > > Die clevere Geldreserve: der DiBa-Privatkredit. Funktioniert wie ein Dispo, > > ist aber viel gunstiger! Alle Infos: http://diba.web.de/?mc=021104 > > > > > > ---------------------------(end of broadcast)--------------------------- > > TIP 4: Don't 'kill -9' the postmaster > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073