1
0
mirror of https://github.com/postgres/postgres.git synced 2025-04-22 23:02:54 +03:00

Cleanup of target file.

This commit is contained in:
Bruce Momjian 1998-08-25 03:22:49 +00:00
parent 0fc13f582a
commit 6f36e9f7c9

View File

@ -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");
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++;