Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 6f36e9f

Browse files
committed
Cleanup of target file.
1 parent 0fc13f5 commit 6f36e9f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/backend/parser/parse_target.c

+5-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.23 1998/08/25 03:17:28 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.24 1998/08/25 03:22:49 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -498,12 +498,14 @@ printf("transformTargetList: decode T_Attr\n");
498498
resname = (res->name) ? res->name : strVal(lfirst(attrs));
499499
if (pstate->p_is_insert || pstate->p_is_update)
500500
{
501+
Relation rd;
501502
/*
502503
* insert or update query -- insert, update work only on one
503504
* relation, so multiple occurence of same resdomno is bogus
504505
*/
505-
relid = refnameRangeTableEntry(pstate, att->relname)->relid;
506-
resdomno = get_attnum(relid, attrname);
506+
rd = pstate->p_target_relation;
507+
Assert(rd != NULL);
508+
resdomno = attnameAttNum(rd, res->name);
507509
}
508510
else
509511
resdomno = pstate->p_last_resno++;

0 commit comments

Comments
 (0)