Re: Table alias in DELETE statements

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Hanno Wiegard <hwiegard(at)web(dot)de>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Table alias in DELETE statements
Date: 2002-09-16 04:03:32
Message-ID: 200209160403.g8G43Wr27435@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


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(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Jerome Chochon 2002-09-16 06:57:37 Rules and Triggers: another question
Previous Message jlparkinson 2002-09-15 21:34:15 Re: Slow Multi-joins performance [DEVELOPERS attn please]