Cleanup of target file.

This commit is contained in:
Bruce Momjian 1998-08-25 03:22:49 +00:00
parent 0fc13f582a
commit 6f36e9f7c9
1 changed files with 5 additions and 3 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.23 1998/08/25 03:17:28 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.24 1998/08/25 03:22:49 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -498,12 +498,14 @@ printf("transformTargetList: decode T_Attr\n");
resname = (res->name) ? res->name : strVal(lfirst(attrs));
if (pstate->p_is_insert || pstate->p_is_update)
{
Relation rd;
/*
* insert or update query -- insert, update work only on one
* relation, so multiple occurence of same resdomno is bogus
*/
relid = refnameRangeTableEntry(pstate, att->relname)->relid;
resdomno = get_attnum(relid, attrname);
rd = pstate->p_target_relation;
Assert(rd != NULL);
resdomno = attnameAttNum(rd, res->name);
}
else
resdomno = pstate->p_last_resno++;