Re: [HACKERS] Table aliases in delete statements? - Mailing list pgsql-hackers

From Brian E Gallew
Subject Re: [HACKERS] Table aliases in delete statements?
Date
Msg-id [email protected]
Whole thread Raw
In response to Re: [HACKERS] Table aliases in delete statements?  (Tom Lane <[email protected]>)
List pgsql-hackers
Then <[email protected]> spoke up and said:
> Keith Parks <[email protected]> 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 [email protected] for my public key.                            |
=====================================================================

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] Multibyte in autoconf
Next
From: Tatsuo Ishii
Date:
Subject: Re: [HACKERS] Multibyte in autoconf