Re: [HACKERS] Table aliases in delete statements?

From: Brian E Gallew <geek+(at)cmu(dot)edu>
To: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Table aliases in delete statements?
Date: 1999-12-08 14:00:23
Message-ID: emacs-smtp-20280-14414-25719-223163@export.andrew.cmu.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Then <tgl(at)sss(dot)pgh(dot)pa(dot)us> spoke up and said:
> Keith Parks <emkxp01(at)mtcc(dot)demon(dot)co(dot)uk> writes:
> > Is there any reason for not allowing table aliases in
> > delete statements?
>
> As Bruce points out in another followup, there's no real need for
> an alias for the target table; if you have sub-selects that need
> independent references to the target, you can always alias *them*.
> The same goes for INSERT and UPDATE, which also take unadorned
> <table name> as the target table specification.

Unless your query is going to be long enough to run into query length
limits, aliases are not your friends. Standard SQL they may be, but
aliases always end up obscuring queries to those who come along after
you.

--
=====================================================================
| JAVA must have been developed in the wilds of West Virginia. |
| After all, why else would it support only single inheritance?? |
=====================================================================
| Finger geek(at)cmu(dot)edu for my public key. |
=====================================================================

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 1999-12-08 14:31:52 Re: [HACKERS] Multibyte in autoconf
Previous Message Peter Eisentraut 1999-12-08 13:31:19 Re: [HACKERS] Multibyte in autoconf