|
8 | 8 | * Portions Copyright (c) 1994, Regents of the University of California |
9 | 9 | * |
10 | 10 | * IDENTIFICATION |
11 | | - * $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.78 2001/05/31 18:16:54 tgl Exp $ |
| 11 | + * $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.79 2001/06/11 05:00:56 tgl Exp $ |
12 | 12 | * |
13 | 13 | *------------------------------------------------------------------------- |
14 | 14 | */ |
@@ -1370,8 +1370,10 @@ gistchoose(Relation r, Page p, IndexTuple it,/* it has compressed entry */ |
1370 | 1370 | for (i=FirstOffsetNumber;i <=maxoff&&sum_grow;i=OffsetNumberNext(i)) |
1371 | 1371 | { |
1372 | 1372 | sum_grow=0; |
1373 | | -for(j=0;j<r->rd_att->natts;j++ ) { |
1374 | | -datum=index_getattr( (IndexTuple)PageGetItem(p,PageGetItemId(p,i)),j+1,r->rd_att,&IsNull); |
| 1373 | +for (j=0;j<r->rd_att->natts;j++) { |
| 1374 | +IndexTupleitup= (IndexTuple)PageGetItem(p,PageGetItemId(p,i)); |
| 1375 | + |
| 1376 | +datum=index_getattr(itup,j+1,r->rd_att,&IsNull); |
1375 | 1377 | gistdentryinit(giststate,j,&entry,datum,r,p,i,ATTSIZE(datum,r,j+1,IsNull ), FALSE); |
1376 | 1378 | FunctionCall3(&giststate->penaltyFn[j], |
1377 | 1379 | PointerGetDatum(&entry), |
|