8
8
*
9
9
*
10
10
* IDENTIFICATION
11
- * $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.28 1998/09/0106:51:35 momjian Exp $
11
+ * $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.29 1998/09/0116:21:47 momjian Exp $
12
12
*
13
13
*-------------------------------------------------------------------------
14
14
*/
@@ -106,9 +106,9 @@ CatalogIndexInsert(Relation *idescs,
106
106
Relation heapRelation ,
107
107
HeapTuple heapTuple )
108
108
{
109
- HeapTuple pgIndexTup ;
109
+ HeapTuple index_tup ;
110
110
TupleDesc heapDescriptor ;
111
- Form_pg_index pgIndexP ;
111
+ Form_pg_index index_form ;
112
112
Datum datum ;
113
113
int natts ;
114
114
AttrNumber * attnumP ;
@@ -123,33 +123,33 @@ CatalogIndexInsert(Relation *idescs,
123
123
{
124
124
InsertIndexResult indexRes ;
125
125
126
- pgIndexTup = SearchSysCacheTupleCopy (INDEXRELID ,
126
+ index_tup = SearchSysCacheTupleCopy (INDEXRELID ,
127
127
ObjectIdGetDatum (idescs [i ]-> rd_id ),
128
128
0 ,0 ,0 );
129
- Assert (pgIndexTup );
130
- pgIndexP = (Form_pg_index )GETSTRUCT (pgIndexTup );
129
+ Assert (index_tup );
130
+ index_form = (Form_pg_index )GETSTRUCT (index_tup );
131
131
132
132
/*
133
133
* Compute the number of attributes we are indexing upon.
134
134
*/
135
- for (attnumP = pgIndexP -> indkey ,natts = 0 ;
135
+ for (attnumP = index_form -> indkey ,natts = 0 ;
136
136
* attnumP != InvalidAttrNumber ;
137
137
attnumP ++ ,natts ++ )
138
138
;
139
139
140
- if (pgIndexP -> indproc != InvalidOid )
140
+ if (index_form -> indproc != InvalidOid )
141
141
{
142
142
FIgetnArgs (& finfo )= natts ;
143
143
natts = 1 ;
144
- FIgetProcOid (& finfo )= pgIndexP -> indproc ;
144
+ FIgetProcOid (& finfo )= index_form -> indproc ;
145
145
* (FIgetname (& finfo ))= '\0' ;
146
146
finfoP = & finfo ;
147
147
}
148
148
else
149
149
finfoP = (FuncIndexInfo * )NULL ;
150
150
151
151
FormIndexDatum (natts ,
152
- (AttrNumber * )pgIndexP -> indkey ,
152
+ (AttrNumber * )index_form -> indkey ,
153
153
heapTuple ,
154
154
heapDescriptor ,
155
155
& datum ,
@@ -160,7 +160,7 @@ CatalogIndexInsert(Relation *idescs,
160
160
& heapTuple -> t_ctid ,heapRelation );
161
161
if (indexRes )
162
162
pfree (indexRes );
163
- pfree (pgIndexTup );
163
+ pfree (index_tup );
164
164
}
165
165
}
166
166
@@ -230,10 +230,8 @@ CatalogIndexFetchTuple(Relation heapRelation,
230
230
sd = index_beginscan (idesc , false,num_keys ,skey );
231
231
while ((indexRes = index_getnext (sd ,ForwardScanDirection )))
232
232
{
233
- ItemPointer iptr ;
234
-
235
- iptr = & indexRes -> heap_iptr ;
236
- tuple = heap_fetch (heapRelation ,SnapshotNow ,iptr ,& buffer );
233
+ tuple = heap_fetch (heapRelation ,SnapshotNow ,& indexRes -> heap_iptr ,
234
+ & buffer );
237
235
pfree (indexRes );
238
236
if (HeapTupleIsValid (tuple ))
239
237
break ;