| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Keith Parks <emkxp01(at)mtcc(dot)demon(dot)co(dot)uk> |
| Cc: | hackers(at)postgreSQL(dot)org |
| Subject: | Re: [HACKERS] Table aliases in delete statements? |
| Date: | 1999-12-08 06:27:53 |
| Message-ID: | 25765.944634473@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Keith Parks <emkxp01(at)mtcc(dot)demon(dot)co(dot)uk> writes:
> Is there any reason for not allowing table aliases in
> delete statements?
Not much, I suppose, but it's not in SQL92:
<delete statement: searched> ::=
DELETE FROM <table name>
[ WHERE <search condition> ]
The expansion of <table name> doesn't mention anything about aliases.
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.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tatsuo Ishii | 1999-12-08 07:23:04 | Re: [HACKERS] Multibyte in autoconf |
| Previous Message | Lamar Owen | 1999-12-08 02:46:40 | Re: [HACKERS] perl-DBD-Pg (was Re: BOUNCE pgsql-ports@postgreSQL.org: Non-member submission from[Joe Brenner <doom@kzsu.stanford.edu>] (fwd)) |