File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 7
7
*
8
8
*
9
9
* 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 $
11
11
*
12
12
*-------------------------------------------------------------------------
13
13
*/
@@ -498,12 +498,14 @@ printf("transformTargetList: decode T_Attr\n");
498
498
resname = (res -> name ) ? res -> name : strVal (lfirst (attrs ));
499
499
if (pstate -> p_is_insert || pstate -> p_is_update )
500
500
{
501
+ Relation rd ;
501
502
/*
502
503
* insert or update query -- insert, update work only on one
503
504
* relation, so multiple occurence of same resdomno is bogus
504
505
*/
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 );
507
509
}
508
510
else
509
511
resdomno = pstate -> p_last_resno ++ ;
You can’t perform that action at this time.
0 commit comments