Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc0dd20f

Browse files
committed
cleanup
1 parentb9cbb1e commitc0dd20f

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

‎src/backend/catalog/indexing.c

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
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,
106106
RelationheapRelation,
107107
HeapTupleheapTuple)
108108
{
109-
HeapTuplepgIndexTup;
109+
HeapTupleindex_tup;
110110
TupleDescheapDescriptor;
111-
Form_pg_indexpgIndexP;
111+
Form_pg_indexindex_form;
112112
Datumdatum;
113113
intnatts;
114114
AttrNumber*attnumP;
@@ -123,33 +123,33 @@ CatalogIndexInsert(Relation *idescs,
123123
{
124124
InsertIndexResultindexRes;
125125

126-
pgIndexTup=SearchSysCacheTupleCopy(INDEXRELID,
126+
index_tup=SearchSysCacheTupleCopy(INDEXRELID,
127127
ObjectIdGetDatum(idescs[i]->rd_id),
128128
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);
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;
137137
attnumP++,natts++)
138138
;
139139

140-
if (pgIndexP->indproc!=InvalidOid)
140+
if (index_form->indproc!=InvalidOid)
141141
{
142142
FIgetnArgs(&finfo)=natts;
143143
natts=1;
144-
FIgetProcOid(&finfo)=pgIndexP->indproc;
144+
FIgetProcOid(&finfo)=index_form->indproc;
145145
*(FIgetname(&finfo))='\0';
146146
finfoP=&finfo;
147147
}
148148
else
149149
finfoP= (FuncIndexInfo*)NULL;
150150

151151
FormIndexDatum(natts,
152-
(AttrNumber*)pgIndexP->indkey,
152+
(AttrNumber*)index_form->indkey,
153153
heapTuple,
154154
heapDescriptor,
155155
&datum,
@@ -160,7 +160,7 @@ CatalogIndexInsert(Relation *idescs,
160160
&heapTuple->t_ctid,heapRelation);
161161
if (indexRes)
162162
pfree(indexRes);
163-
pfree(pgIndexTup);
163+
pfree(index_tup);
164164
}
165165
}
166166

@@ -230,10 +230,8 @@ CatalogIndexFetchTuple(Relation heapRelation,
230230
sd=index_beginscan(idesc, false,num_keys,skey);
231231
while ((indexRes=index_getnext(sd,ForwardScanDirection)))
232232
{
233-
ItemPointeriptr;
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);
237235
pfree(indexRes);
238236
if (HeapTupleIsValid(tuple))
239237
break;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp