88 *
99 *
1010 * 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 $
1212 *
1313 *-------------------------------------------------------------------------
1414 */
@@ -106,9 +106,9 @@ CatalogIndexInsert(Relation *idescs,
106106Relation heapRelation ,
107107HeapTuple heapTuple )
108108{
109- HeapTuple pgIndexTup ;
109+ HeapTuple index_tup ;
110110TupleDesc heapDescriptor ;
111- Form_pg_index pgIndexP ;
111+ Form_pg_index index_form ;
112112Datum datum ;
113113int natts ;
114114AttrNumber * attnumP ;
@@ -123,33 +123,33 @@ CatalogIndexInsert(Relation *idescs,
123123{
124124InsertIndexResult indexRes ;
125125
126- pgIndexTup = SearchSysCacheTupleCopy (INDEXRELID ,
126+ index_tup = SearchSysCacheTupleCopy (INDEXRELID ,
127127ObjectIdGetDatum (idescs [i ]-> rd_id ),
1281280 ,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 );
131131
132132/*
133133 * Compute the number of attributes we are indexing upon.
134134 */
135- for (attnumP = pgIndexP -> indkey ,natts = 0 ;
135+ for (attnumP = index_form -> indkey ,natts = 0 ;
136136* attnumP != InvalidAttrNumber ;
137137attnumP ++ ,natts ++ )
138138;
139139
140- if (pgIndexP -> indproc != InvalidOid )
140+ if (index_form -> indproc != InvalidOid )
141141{
142142FIgetnArgs (& finfo )= natts ;
143143natts = 1 ;
144- FIgetProcOid (& finfo )= pgIndexP -> indproc ;
144+ FIgetProcOid (& finfo )= index_form -> indproc ;
145145* (FIgetname (& finfo ))= '\0' ;
146146finfoP = & finfo ;
147147}
148148else
149149finfoP = (FuncIndexInfo * )NULL ;
150150
151151FormIndexDatum (natts ,
152- (AttrNumber * )pgIndexP -> indkey ,
152+ (AttrNumber * )index_form -> indkey ,
153153heapTuple ,
154154heapDescriptor ,
155155& datum ,
@@ -160,7 +160,7 @@ CatalogIndexInsert(Relation *idescs,
160160& heapTuple -> t_ctid ,heapRelation );
161161if (indexRes )
162162pfree (indexRes );
163- pfree (pgIndexTup );
163+ pfree (index_tup );
164164}
165165}
166166
@@ -230,10 +230,8 @@ CatalogIndexFetchTuple(Relation heapRelation,
230230sd = index_beginscan (idesc , false,num_keys ,skey );
231231while ((indexRes = index_getnext (sd ,ForwardScanDirection )))
232232{
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 );
237235pfree (indexRes );
238236if (HeapTupleIsValid (tuple ))
239237break ;