mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
Allow an optional alias for the target table to be specified for UPDATE
and DELETE. If specified, the alias must be used instead of the full table name. Also, the alias currently cannot be used in the SET clause of UPDATE. Patch from Atsushi Ogawa, various editorialization by Neil Conway. Along the way, make the rowtypes regression test pass if add_missing_from is enabled, and add a new (skeletal) regression test for DELETE.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/parser/parse_clause.c,v 1.144 2005/11/22 18:17:16 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/parser/parse_clause.c,v 1.145 2006/01/22 05:20:34 neilc Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -160,7 +160,7 @@ setTargetTable(ParseState *pstate, RangeVar *relation,
|
||||
* Now build an RTE.
|
||||
*/
|
||||
rte = addRangeTableEntryForRelation(pstate, pstate->p_target_relation,
|
||||
NULL, inh, false);
|
||||
relation->alias, inh, false);
|
||||
pstate->p_target_rangetblentry = rte;
|
||||
|
||||
/* assume new rte is at end */
|
||||
|
Reference in New Issue
Block a user