Skip to content

Commit 7944d50

Browse files
committed
Use -ieee alpha flag for gcc and egcs only.
1 parent 41b60ba commit 7944d50

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/20 16:48:54 momjian Exp $
1111
*
1212
*
1313
* INTERFACE ROUTINES
@@ -52,26 +52,23 @@
5252

5353
/* non-export function prototypes */
5454
static Oid GetHeapRelationOid(char *heapRelationName, char *indexRelationName,
55-
bool istemp);
55+
bool istemp);
5656
static TupleDesc BuildFuncTupleDesc(FuncIndexInfo *funcInfo);
5757
static TupleDesc ConstructTupleDescriptor(Oid heapoid, Relation heapRelation,
58-
List *attributeList,
59-
int numatts, AttrNumber *attNums);
58+
List *attributeList, int numatts, AttrNumber *attNums);
6059

6160
static void ConstructIndexReldesc(Relation indexRelation, Oid amoid);
6261
static Oid UpdateRelationRelation(Relation indexRelation, char *temp_relname);
6362
static void InitializeAttributeOids(Relation indexRelation,
64-
int numatts,
65-
Oid indexoid);
66-
static void
67-
AppendAttributeTuples(Relation indexRelation, int numatts);
63+
int numatts, Oid indexoid);
64+
static void AppendAttributeTuples(Relation indexRelation, int numatts);
6865
static void UpdateIndexRelation(Oid indexoid, Oid heapoid,
69-
FuncIndexInfo *funcInfo, int natts,
70-
AttrNumber *attNums, Oid *classOids, Node *predicate,
71-
List *attributeList, bool islossy, bool unique, bool primary);
66+
FuncIndexInfo *funcInfo, int natts,
67+
AttrNumber *attNums, Oid *classOids, Node *predicate,
68+
List *attributeList, bool islossy, bool unique, bool primary);
7269
static void DefaultBuild(Relation heapRelation, Relation indexRelation,
73-
int numberOfAttributes, AttrNumber *attributeNumber,
74-
IndexStrategy indexStrategy, uint16 parameterCount,
70+
int numberOfAttributes, AttrNumber *attributeNumber,
71+
IndexStrategy indexStrategy, uint16 parameterCount,
7572
Datum *parameter, FuncIndexInfoPtr funcInfo, 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/20 16: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
static HeapTuple CatalogIndexFetchTuple(Relation heapRelation,
60-
Relation idesc,
61-
ScanKey skey,
62-
int16 num_keys);
53+
Relation idesc, ScanKey skey, int16 num_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(Relation heapRelation,
259+
Oid claid,
260+
Oid opopr,
261+
Oid opid)
262+
{
263+
Relation idesc;
264+
ScanKeyData skey[3];
265+
HeapTuple tuple;
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+
return tuple;
291+
}
292+
293+
HeapTuple
294+
AccessMethodStrategyIndexScan(Relation heapRelation,
295+
Oid opid,
296+
Oid claid,
297+
int2 opstrategy)
298+
{
299+
Relation idesc;
300+
ScanKeyData skey[3];
301+
HeapTuple tuple;
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+
return tuple;
327+
}
328+
261329
HeapTuple
262330
AttributeNameIndexScan(Relation heapRelation,
263331
Oid relid,
@@ -317,6 +385,28 @@ AttributeNumIndexScan(Relation heapRelation,
317385
return tuple;
318386
}
319387

388+
HeapTuple
389+
IndexRelidIndexScan(Relation heapRelation, Oid relid)
390+
{
391+
Relation idesc;
392+
ScanKeyData skey[1];
393+
HeapTuple tuple;
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+
return tuple;
407+
}
408+
409+
320410

321411
HeapTuple
322412
ProcedureOidIndexScan(Relation heapRelation, Oid procId)

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/20 02:44:09 momjian Exp $
7+
# $Header: /cvsroot/pgsql/src/backend/utils/adt/Makefile,v 1.24 1999/07/20 16: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
ifdef MULTIBYTE
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy