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

Commitc175de5

Browse files
committed
Reverse out cache changes that are not ready yet.
1 parent7944d50 commitc175de5

File tree

5 files changed

+84
-180
lines changed

5 files changed

+84
-180
lines changed

‎src/backend/catalog/index.c

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.86 1999/07/2016:48:54 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.87 1999/07/2017:14:05 momjian Exp $
1111
*
1212
*
1313
* INTERFACE ROUTINES
@@ -52,23 +52,26 @@
5252

5353
/* non-export function prototypes */
5454
staticOidGetHeapRelationOid(char*heapRelationName,char*indexRelationName,
55-
boolistemp);
55+
boolistemp);
5656
staticTupleDescBuildFuncTupleDesc(FuncIndexInfo*funcInfo);
5757
staticTupleDescConstructTupleDescriptor(Oidheapoid,RelationheapRelation,
58-
List*attributeList,intnumatts,AttrNumber*attNums);
58+
List*attributeList,
59+
intnumatts,AttrNumber*attNums);
5960

6061
staticvoidConstructIndexReldesc(RelationindexRelation,Oidamoid);
6162
staticOidUpdateRelationRelation(RelationindexRelation,char*temp_relname);
6263
staticvoidInitializeAttributeOids(RelationindexRelation,
63-
intnumatts,Oidindexoid);
64-
staticvoidAppendAttributeTuples(RelationindexRelation,intnumatts);
64+
intnumatts,
65+
Oidindexoid);
66+
staticvoid
67+
AppendAttributeTuples(RelationindexRelation,intnumatts);
6568
staticvoidUpdateIndexRelation(Oidindexoid,Oidheapoid,
66-
FuncIndexInfo*funcInfo,intnatts,
67-
AttrNumber*attNums,Oid*classOids,Node*predicate,
68-
List*attributeList,boolislossy,boolunique,boolprimary);
69+
FuncIndexInfo*funcInfo,intnatts,
70+
AttrNumber*attNums,Oid*classOids,Node*predicate,
71+
List*attributeList,boolislossy,boolunique,boolprimary);
6972
staticvoidDefaultBuild(RelationheapRelation,RelationindexRelation,
70-
intnumberOfAttributes,AttrNumber*attributeNumber,
71-
IndexStrategyindexStrategy,uint16parameterCount,
73+
intnumberOfAttributes,AttrNumber*attributeNumber,
74+
IndexStrategyindexStrategy,uint16parameterCount,
7275
Datum*parameter,FuncIndexInfoPtrfuncInfo,PredInfo*predInfo);
7376

7477
/* ----------------------------------------------------------------

‎src/backend/catalog/indexing.c

Lines changed: 19 additions & 109 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.41 1999/07/2016:48:54 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.42 1999/07/2017:14:06 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -28,29 +28,38 @@
2828

2929
/*
3030
* Names of indices on the following system catalogs:
31+
*
32+
*pg_attribute
33+
*pg_proc
34+
*pg_type
35+
*pg_naming
36+
*pg_class
37+
*pg_attrdef
38+
*pg_relcheck
39+
*pg_trigger
3140
*/
3241

33-
char*Name_pg_amop_indices[Num_pg_amop_indices]= {AccessMethodOpidIndex,
34-
AccessMethodStrategyIndex};
3542
char*Name_pg_attr_indices[Num_pg_attr_indices]= {AttributeNameIndex,
36-
AttributeNumIndex,AttributeRelidIndex};
37-
char*Name_pg_index_indices[Num_pg_index_indices]= {IndexRelidIndex};
43+
AttributeNumIndex,
44+
AttributeRelidIndex};
3845
char*Name_pg_proc_indices[Num_pg_proc_indices]= {ProcedureNameIndex,
39-
ProcedureOidIndex,ProcedureSrcIndex};
46+
ProcedureOidIndex,
47+
ProcedureSrcIndex};
4048
char*Name_pg_type_indices[Num_pg_type_indices]= {TypeNameIndex,
41-
TypeOidIndex};
49+
TypeOidIndex};
4250
char*Name_pg_class_indices[Num_pg_class_indices]= {ClassNameIndex,
43-
ClassOidIndex};
51+
ClassOidIndex};
4452
char*Name_pg_attrdef_indices[Num_pg_attrdef_indices]= {AttrDefaultIndex};
4553

4654
char*Name_pg_relcheck_indices[Num_pg_relcheck_indices]= {RelCheckIndex};
4755

4856
char*Name_pg_trigger_indices[Num_pg_trigger_indices]= {TriggerRelidIndex};
49-
char*Name_pg_description_indices[Num_pg_description_indices]= {DescriptionObjIndex};
5057

5158

5259
staticHeapTupleCatalogIndexFetchTuple(RelationheapRelation,
53-
Relationidesc,ScanKeyskey,int16num_keys);
60+
Relationidesc,
61+
ScanKeyskey,
62+
int16num_keys);
5463

5564

5665
/*
@@ -243,89 +252,12 @@ CatalogIndexFetchTuple(Relation heapRelation,
243252
}
244253

245254

246-
/*---------------------------------------------------------------------
247-
* Class-specific index lookups
248-
*---------------------------------------------------------------------
249-
*/
250-
251255
/*
252256
* The remainder of the file is for individual index scan routines. Each
253257
* index should be scanned according to how it was defined during bootstrap
254258
* (that is, functional or normal) and what arguments the cache lookup
255259
* requires. Each routine returns the heap tuple that qualifies.
256260
*/
257-
HeapTuple
258-
AccessMethodOpidIndexScan(RelationheapRelation,
259-
Oidclaid,
260-
Oidopopr,
261-
Oidopid)
262-
{
263-
Relationidesc;
264-
ScanKeyDataskey[3];
265-
HeapTupletuple;
266-
267-
ScanKeyEntryInitialize(&skey[0],
268-
(bits16)0x0,
269-
(AttrNumber)1,
270-
(RegProcedure)F_OIDEQ,
271-
ObjectIdGetDatum(claid));
272-
273-
ScanKeyEntryInitialize(&skey[1],
274-
(bits16)0x0,
275-
(AttrNumber)2,
276-
(RegProcedure)F_OIDEQ,
277-
ObjectIdGetDatum(opopr));
278-
279-
ScanKeyEntryInitialize(&skey[2],
280-
(bits16)0x0,
281-
(AttrNumber)3,
282-
(RegProcedure)F_OIDEQ,
283-
ObjectIdGetDatum(opid));
284-
285-
idesc=index_openr(AccessMethodOpidIndex);
286-
tuple=CatalogIndexFetchTuple(heapRelation,idesc,skey,3);
287-
288-
index_close(idesc);
289-
290-
returntuple;
291-
}
292-
293-
HeapTuple
294-
AccessMethodStrategyIndexScan(RelationheapRelation,
295-
Oidopid,
296-
Oidclaid,
297-
int2opstrategy)
298-
{
299-
Relationidesc;
300-
ScanKeyDataskey[3];
301-
HeapTupletuple;
302-
303-
ScanKeyEntryInitialize(&skey[0],
304-
(bits16)0x0,
305-
(AttrNumber)1,
306-
(RegProcedure)F_OIDEQ,
307-
ObjectIdGetDatum(opid));
308-
309-
ScanKeyEntryInitialize(&skey[1],
310-
(bits16)0x0,
311-
(AttrNumber)2,
312-
(RegProcedure)F_OIDEQ,
313-
ObjectIdGetDatum(claid));
314-
315-
ScanKeyEntryInitialize(&skey[2],
316-
(bits16)0x0,
317-
(AttrNumber)3,
318-
(RegProcedure)F_INT2EQ,
319-
Int16GetDatum(opstrategy));
320-
321-
idesc=index_openr(AccessMethodStrategyIndex);
322-
tuple=CatalogIndexFetchTuple(heapRelation,idesc,skey,3);
323-
324-
index_close(idesc);
325-
326-
returntuple;
327-
}
328-
329261
HeapTuple
330262
AttributeNameIndexScan(RelationheapRelation,
331263
Oidrelid,
@@ -385,28 +317,6 @@ AttributeNumIndexScan(Relation heapRelation,
385317
returntuple;
386318
}
387319

388-
HeapTuple
389-
IndexRelidIndexScan(RelationheapRelation,Oidrelid)
390-
{
391-
Relationidesc;
392-
ScanKeyDataskey[1];
393-
HeapTupletuple;
394-
395-
ScanKeyEntryInitialize(&skey[0],
396-
(bits16)0x0,
397-
(AttrNumber)1,
398-
(RegProcedure)F_OIDEQ,
399-
ObjectIdGetDatum(relid));
400-
401-
idesc=index_openr(IndexRelidIndex);
402-
tuple=CatalogIndexFetchTuple(heapRelation,idesc,skey,1);
403-
404-
index_close(idesc);
405-
406-
returntuple;
407-
}
408-
409-
410320

411321
HeapTuple
412322
ProcedureOidIndexScan(RelationheapRelation,OidprocId)

‎src/backend/utils/cache/syscache.c

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.32 1999/07/2016:48:55 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.33 1999/07/2017:14:06 momjian Exp $
1111
*
1212
* NOTES
1313
* These routines allow the parser/planner/executor to perform
@@ -58,8 +58,8 @@ static struct cachedesc cacheinfo[] = {
5858
0
5959
},
6060
sizeof(FormData_pg_amop),
61-
AccessMethodOpidIndex,
62-
(ScanFunc)AccessMethodOpidIndexScan},
61+
NULL,
62+
(ScanFunc)NULL},
6363
{AccessMethodOperatorRelationName,/* AMOPSTRATEGY */
6464
3,
6565
{
@@ -69,8 +69,8 @@ static struct cachedesc cacheinfo[] = {
6969
0
7070
},
7171
sizeof(FormData_pg_amop),
72-
AccessMethodStrategyIndex,
73-
(ScanFunc)AccessMethodStrategyIndexScan},
72+
NULL,
73+
(ScanFunc)NULL},
7474
{AttributeRelationName,/* ATTNAME */
7575
2,
7676
{
@@ -81,7 +81,7 @@ static struct cachedesc cacheinfo[] = {
8181
},
8282
ATTRIBUTE_TUPLE_SIZE,
8383
AttributeNameIndex,
84-
(ScanFunc)IndexRelidIndexScan},
84+
(ScanFunc)AttributeNameIndexScan},
8585
{AttributeRelationName,/* ATTNUM */
8686
2,
8787
{
@@ -102,8 +102,8 @@ static struct cachedesc cacheinfo[] = {
102102
0
103103
},
104104
offsetof(FormData_pg_index,indpred),
105-
IndexRelidIndex,
106-
(ScanFunc)IndexRelidIndexScan},
105+
NULL,
106+
NULL},
107107
{LanguageRelationName,/* LANNAME */
108108
1,
109109
{
@@ -225,6 +225,17 @@ static struct cachedesc cacheinfo[] = {
225225
sizeof(FormData_pg_opclass),
226226
NULL,
227227
NULL},
228+
{IndexRelationName,/* INDRELIDKEY *//* never used */
229+
2,
230+
{
231+
Anum_pg_index_indrelid,
232+
Anum_pg_index_indkey,
233+
0,
234+
0
235+
},
236+
offsetof(FormData_pg_index,indpred),
237+
NULL,
238+
(ScanFunc)NULL},
228239
{InheritsRelationName,/* INHRELID */
229240
2,
230241
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp