mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-02-11 19:20:40 +08:00
setVarAttrLenForCreateTable(): use varnoold/varoattno instead of
varno/varattno.
This commit is contained in:
parent
380eaaa139
commit
41882fde34
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.8 1997/05/31 16:52:02 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.9 1997/06/13 03:24:26 vadim Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -1155,11 +1155,11 @@ setVarAttrLenForCreateTable(TupleDesc tupType, List *targetList,
|
|||||||
Relation rd;
|
Relation rd;
|
||||||
|
|
||||||
var = (Var *)expr;
|
var = (Var *)expr;
|
||||||
rtentry = rt_fetch(var->varno, rangeTable);
|
rtentry = rt_fetch(var->varnoold, rangeTable);
|
||||||
rd = heap_open(rtentry->relid);
|
rd = heap_open(rtentry->relid);
|
||||||
/* set length to that defined in relation */
|
/* set length to that defined in relation */
|
||||||
tupType->attrs[varno]->attlen =
|
tupType->attrs[varno]->attlen =
|
||||||
(*rd->rd_att->attrs[var->varattno-1]).attlen;
|
(*rd->rd_att->attrs[var->varoattno-1]).attlen;
|
||||||
heap_close(rd);
|
heap_close(rd);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user