Commit 6f36e9f7 authored by Bruce Momjian's avatar Bruce Momjian

Cleanup of target file.

parent 0fc13f58
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * 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"); ...@@ -498,12 +498,14 @@ printf("transformTargetList: decode T_Attr\n");
resname = (res->name) ? res->name : strVal(lfirst(attrs)); resname = (res->name) ? res->name : strVal(lfirst(attrs));
if (pstate->p_is_insert || pstate->p_is_update) if (pstate->p_is_insert || pstate->p_is_update)
{ {
Relation rd;
/* /*
* insert or update query -- insert, update work only on one * insert or update query -- insert, update work only on one
* relation, so multiple occurence of same resdomno is bogus * relation, so multiple occurence of same resdomno is bogus
*/ */
relid = refnameRangeTableEntry(pstate, att->relname)->relid; rd = pstate->p_target_relation;
resdomno = get_attnum(relid, attrname); Assert(rd != NULL);
resdomno = attnameAttNum(rd, res->name);
} }
else else
resdomno = pstate->p_last_resno++; resdomno = pstate->p_last_resno++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment