cleanup
authorBruce Momjian
Tue, 1 Sep 1998 16:21:47 +0000 (16:21 +0000)
committerBruce Momjian
Tue, 1 Sep 1998 16:21:47 +0000 (16:21 +0000)
src/backend/catalog/indexing.c

index 5fbaffd2a6c28a5227aadaf4574618235a54be4a..f685bf3e7958b4361e83b3fb8f887752a5ebf884 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.28 1998/09/01 06:51:35 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.29 1998/09/01 16:21:47 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -106,9 +106,9 @@ CatalogIndexInsert(Relation *idescs,
                   Relation heapRelation,
                   HeapTuple heapTuple)
 {
-   HeapTuple   pgIndexTup;
+   HeapTuple   index_tup;
    TupleDesc   heapDescriptor;
-   Form_pg_index pgIndexP;
+   Form_pg_index index_form;
    Datum       datum;
    int         natts;
    AttrNumber *attnumP;
@@ -123,25 +123,25 @@ CatalogIndexInsert(Relation *idescs,
    {
        InsertIndexResult indexRes;
 
-       pgIndexTup = SearchSysCacheTupleCopy(INDEXRELID,
+       index_tup = SearchSysCacheTupleCopy(INDEXRELID,
                                      ObjectIdGetDatum(idescs[i]->rd_id),
                                             0, 0, 0);
-       Assert(pgIndexTup);
-       pgIndexP = (Form_pg_index) GETSTRUCT(pgIndexTup);
+       Assert(index_tup);
+       index_form = (Form_pg_index) GETSTRUCT(index_tup);
 
        /*
         * Compute the number of attributes we are indexing upon.
         */
-       for (attnumP = pgIndexP->indkey, natts = 0;
+       for (attnumP = index_form->indkey, natts = 0;
             *attnumP != InvalidAttrNumber;
             attnumP++, natts++)
            ;
 
-       if (pgIndexP->indproc != InvalidOid)
+       if (index_form->indproc != InvalidOid)
        {
            FIgetnArgs(&finfo) = natts;
            natts = 1;
-           FIgetProcOid(&finfo) = pgIndexP->indproc;
+           FIgetProcOid(&finfo) = index_form->indproc;
            *(FIgetname(&finfo)) = '\0';
            finfoP = &finfo;
        }
@@ -149,7 +149,7 @@ CatalogIndexInsert(Relation *idescs,
            finfoP = (FuncIndexInfo *) NULL;
 
        FormIndexDatum(natts,
-                      (AttrNumber *) pgIndexP->indkey,
+                      (AttrNumber *) index_form->indkey,
                       heapTuple,
                       heapDescriptor,
                       &datum,
@@ -160,7 +160,7 @@ CatalogIndexInsert(Relation *idescs,
                                &heapTuple->t_ctid, heapRelation);
        if (indexRes)
            pfree(indexRes);
-       pfree(pgIndexTup);
+       pfree(index_tup);
    }
 }
 
@@ -230,10 +230,8 @@ CatalogIndexFetchTuple(Relation heapRelation,
    sd = index_beginscan(idesc, false, num_keys, skey);
    while ((indexRes = index_getnext(sd, ForwardScanDirection)))
    {
-       ItemPointer iptr;
-
-       iptr = &indexRes->heap_iptr;
-       tuple = heap_fetch(heapRelation, SnapshotNow, iptr, &buffer);
+       tuple = heap_fetch(heapRelation, SnapshotNow, &indexRes->heap_iptr,
+                           &buffer);
        pfree(indexRes);
        if (HeapTupleIsValid(tuple))
            break;