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

Commit7944d50

Browse files
committed
Use -ieee alpha flag for gcc and egcs only.
1 parent41b60ba commit7944d50

File tree

6 files changed

+186
-85
lines changed

6 files changed

+186
-85
lines changed

‎src/backend/catalog/index.c

Lines changed: 10 additions & 13 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.85 1999/07/17 20:16:49 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.86 1999/07/2016:48:54 momjian Exp $
1111
*
1212
*
1313
* INTERFACE ROUTINES
@@ -52,26 +52,23 @@
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,
59-
intnumatts,AttrNumber*attNums);
58+
List*attributeList,intnumatts,AttrNumber*attNums);
6059

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

7774
/* ----------------------------------------------------------------

‎src/backend/catalog/indexing.c

Lines changed: 109 additions & 19 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.40 1999/07/17 20:16:49 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.41 1999/07/2016:48:54 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -28,38 +28,29 @@
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
4031
*/
4132

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

5446
char*Name_pg_relcheck_indices[Num_pg_relcheck_indices]= {RelCheckIndex};
5547

5648
char*Name_pg_trigger_indices[Num_pg_trigger_indices]= {TriggerRelidIndex};
49+
char*Name_pg_description_indices[Num_pg_description_indices]= {DescriptionObjIndex};
5750

5851

5952
staticHeapTupleCatalogIndexFetchTuple(RelationheapRelation,
60-
Relationidesc,
61-
ScanKeyskey,
62-
int16num_keys);
53+
Relationidesc,ScanKeyskey,int16num_keys);
6354

6455

6556
/*
@@ -252,12 +243,89 @@ CatalogIndexFetchTuple(Relation heapRelation,
252243
}
253244

254245

246+
/*---------------------------------------------------------------------
247+
* Class-specific index lookups
248+
*---------------------------------------------------------------------
249+
*/
250+
255251
/*
256252
* The remainder of the file is for individual index scan routines. Each
257253
* index should be scanned according to how it was defined during bootstrap
258254
* (that is, functional or normal) and what arguments the cache lookup
259255
* requires. Each routine returns the heap tuple that qualifies.
260256
*/
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+
261329
HeapTuple
262330
AttributeNameIndexScan(RelationheapRelation,
263331
Oidrelid,
@@ -317,6 +385,28 @@ AttributeNumIndexScan(Relation heapRelation,
317385
returntuple;
318386
}
319387

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+
320410

321411
HeapTuple
322412
ProcedureOidIndexScan(RelationheapRelation,OidprocId)

‎src/backend/utils/adt/Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Makefile for utils/adt
55
#
66
# IDENTIFICATION
7-
# $Header: /cvsroot/pgsql/src/backend/utils/adt/Makefile,v 1.23 1999/07/2002:44:09 momjian Exp $
7+
# $Header: /cvsroot/pgsql/src/backend/utils/adt/Makefile,v 1.24 1999/07/2016:48:55 momjian Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -15,8 +15,13 @@ CFLAGS += -I../..
1515

1616
# seems to be required for some date/time stuff 07/19/1999 bjm
1717
ifeq ($(CPU),alpha)
18+
ifeq ($(CC), gcc)
1819
CFLAGS+= -mieee
1920
endif
21+
ifeq ($(CC), egcs)
22+
CFLAGS+= -mieee
23+
endif
24+
endif
2025

2126
ifdefMULTIBYTE
2227
CFLAGS+=$(MBFLAGS)

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

Lines changed: 8 additions & 19 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.31 1999/07/17 20:18:02 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.32 1999/07/20 16:48:55 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-
NULL,
62-
(ScanFunc)NULL},
61+
AccessMethodOpidIndex,
62+
(ScanFunc)AccessMethodOpidIndexScan},
6363
{AccessMethodOperatorRelationName,/* AMOPSTRATEGY */
6464
3,
6565
{
@@ -69,8 +69,8 @@ static struct cachedesc cacheinfo[] = {
6969
0
7070
},
7171
sizeof(FormData_pg_amop),
72-
NULL,
73-
(ScanFunc)NULL},
72+
AccessMethodStrategyIndex,
73+
(ScanFunc)AccessMethodStrategyIndexScan},
7474
{AttributeRelationName,/* ATTNAME */
7575
2,
7676
{
@@ -81,7 +81,7 @@ static struct cachedesc cacheinfo[] = {
8181
},
8282
ATTRIBUTE_TUPLE_SIZE,
8383
AttributeNameIndex,
84-
(ScanFunc)AttributeNameIndexScan},
84+
(ScanFunc)IndexRelidIndexScan},
8585
{AttributeRelationName,/* ATTNUM */
8686
2,
8787
{
@@ -102,8 +102,8 @@ static struct cachedesc cacheinfo[] = {
102102
0
103103
},
104104
offsetof(FormData_pg_index,indpred),
105-
NULL,
106-
NULL},
105+
IndexRelidIndex,
106+
(ScanFunc)IndexRelidIndexScan},
107107
{LanguageRelationName,/* LANNAME */
108108
1,
109109
{
@@ -225,17 +225,6 @@ 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},
239228
{InheritsRelationName,/* INHRELID */
240229
2,
241230
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp