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

Commit1054097

Browse files
committed
More cleanups of the include files
- centralizing to simplify the -I's required to compile
1 parentca405ae commit1054097

File tree

107 files changed

+13489
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+13489
-3
lines changed

‎src/include/access/funcindex.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,13 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: funcindex.h,v 1.1 1996/08/27 21:50:08 scrappy Exp $
9+
* $Id: funcindex.h,v 1.2 1996/08/28 01:56:16 scrappy Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
1313
#ifndef_FUNC_INDEX_INCLUDED_
1414
#define_FUNC_INDEX_INCLUDED_
1515

16-
#include"postgres.h"
17-
1816
typedefstruct {
1917
intnargs;
2018
Oidarglist[8];

‎src/include/catalog/catalog.h

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*-------------------------------------------------------------------------
2+
*
3+
* catalog.h--
4+
* prototypes for functions in lib/catalog/catalog.c
5+
*
6+
*
7+
* Copyright (c) 1994, Regents of the University of California
8+
*
9+
* $Id: catalog.h,v 1.1 1996/08/28 01:56:21 scrappy Exp $
10+
*
11+
*-------------------------------------------------------------------------
12+
*/
13+
#ifndefCATALOG_H
14+
#defineCATALOG_H
15+
16+
#include"access/tupdesc.h"
17+
18+
externchar*relpath(charrelname[]);
19+
externboolIsSystemRelationName(char*relname);
20+
externboolIsSharedSystemRelationName(char*relname);
21+
externOidnewoid(void);
22+
externvoidfillatt(TupleDescatt);
23+
24+
#endif/* CATALOG_H */

‎src/include/catalog/catname.h

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/*-------------------------------------------------------------------------
2+
*
3+
* catname.h--
4+
* POSTGRES system catalog relation name definitions.
5+
*
6+
*
7+
* Copyright (c) 1994, Regents of the University of California
8+
*
9+
* $Id: catname.h,v 1.1 1996/08/28 01:56:23 scrappy Exp $
10+
*
11+
*-------------------------------------------------------------------------
12+
*/
13+
#ifndefCATNAME_H
14+
#defineCATNAME_H
15+
16+
#include"postgres.h"
17+
18+
19+
#defineAggregateRelationName "pg_aggregate"
20+
#defineAccessMethodRelationName "pg_am"
21+
#defineAccessMethodOperatorRelationName "pg_amop"
22+
#defineAccessMethodProcedureRelationName "pg_amproc"
23+
#defineAttributeRelationName "pg_attribute"
24+
#defineDatabaseRelationName "pg_database"
25+
#defineDefaultsRelationName "pg_defaults"
26+
#defineDemonRelationName "pg_demon"
27+
#defineGroupRelationName "pg_group"
28+
#defineHostsRelationName "pg_hosts"
29+
#defineIndexRelationName "pg_index"
30+
#defineInheritProcedureRelationName "pg_inheritproc"
31+
#defineInheritsRelationName "pg_inherits"
32+
#defineInheritancePrecidenceListRelationName "pg_ipl"
33+
#defineLanguageRelationName "pg_language"
34+
#defineListenerRelationName "pg_listener"
35+
#defineLogRelationName "pg_log"
36+
#defineMagicRelationName "pg_magic"
37+
#defineOperatorClassRelationName "pg_opclass"
38+
#defineOperatorRelationName "pg_operator"
39+
#defineProcedureRelationName "pg_proc"
40+
#defineRelationRelationName "pg_class"
41+
#defineRewriteRelationName "pg_rewrite"
42+
#defineServerRelationName "pg_server"
43+
#defineStatisticRelationName "pg_statistic"
44+
#defineTimeRelationName "pg_time"
45+
#defineTypeRelationName "pg_type"
46+
#defineUserRelationName "pg_user"
47+
#defineVariableRelationName "pg_variable"
48+
#defineVersionRelationName "pg_version"
49+
50+
externchar*SharedSystemRelationNames[];
51+
52+
#endif/* CATNAME_H */

‎src/include/catalog/heap.h

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*-------------------------------------------------------------------------
2+
*
3+
* heap.h--
4+
* prototypes for functions in lib/catalog/heap.c
5+
*
6+
*
7+
* Copyright (c) 1994, Regents of the University of California
8+
*
9+
* $Id: heap.h,v 1.1 1996/08/28 01:56:26 scrappy Exp $
10+
*
11+
*-------------------------------------------------------------------------
12+
*/
13+
#ifndefHEAP_H
14+
#defineHEAP_H
15+
16+
externRelationheap_creatr(char*relname,unsignedsmgr,TupleDescatt);
17+
18+
externintRelationAlreadyExists(Relationpg_class_desc,charrelname[]);
19+
externvoidaddNewRelationType(char*typeName,Oidnew_rel_oid);
20+
21+
externvoidAddPgRelationTuple(Relationpg_class_desc,
22+
Relationnew_rel_desc,Oidnew_rel_oid,intarch,unsignednatts);
23+
24+
externOidheap_create(charrelname[],
25+
char*typename,
26+
intarch,
27+
unsignedsmgr,TupleDesctupdesc);
28+
29+
externvoidRelationRemoveInheritance(Relationrelation);
30+
externvoidRelationRemoveIndexes(Relationrelation);
31+
externvoidDeletePgRelationTuple(Relationrdesc);
32+
externvoidDeletePgAttributeTuples(Relationrdesc);
33+
externvoidDeletePgTypeTuple(Relationrdesc);
34+
externvoidheap_destroy(charrelname[]);
35+
externvoidheap_destroyr(Relationr);
36+
37+
externvoidInitTempRelList();
38+
externvoidAddToTempRelList(Relationr);
39+
externvoidRemoveFromTempRelList(Relationr);
40+
externvoidDestroyTempRels();
41+
42+
#endif/* HEAP_H */

‎src/include/catalog/index.h

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
/*-------------------------------------------------------------------------
2+
*
3+
* index.h--
4+
* prototypes for index.c.
5+
*
6+
*
7+
* Copyright (c) 1994, Regents of the University of California
8+
*
9+
* $Id: index.h,v 1.1 1996/08/28 01:56:27 scrappy Exp $
10+
*
11+
*-------------------------------------------------------------------------
12+
*/
13+
#ifndefINDEX_H
14+
#defineINDEX_H
15+
16+
#include"access/funcindex.h"
17+
#include"access/itup.h"
18+
#include"nodes/execnodes.h"
19+
#include"nodes/parsenodes.h"
20+
21+
22+
externForm_pg_am
23+
AccessMethodObjectIdGetAccessMethodTupleForm(OidaccessMethodObjectId);
24+
25+
externvoid
26+
UpdateIndexPredicate(Oidindexoid,Node*oldPred,Node*predicate);
27+
28+
externvoidInitIndexStrategy(intnumatts,
29+
RelationindexRelation,
30+
OidaccessMethodObjectId);
31+
32+
externvoidindex_create(char*heapRelationName,
33+
char*indexRelationName,
34+
FuncIndexInfo*funcInfo,
35+
TypeName*IndexKeyType,
36+
OidaccessMethodObjectId,
37+
intnumatts,
38+
AttrNumberattNums[],
39+
OidclassObjectId[],
40+
uint16parameterCount,
41+
Datum*parameter,
42+
Node*predicate,
43+
boolislossy);
44+
45+
externvoidindex_destroy(OidindexId);
46+
47+
externvoidFormIndexDatum(intnumberOfAttributes,
48+
AttrNumberattributeNumber[],HeapTupleheapTuple,
49+
TupleDescheapDescriptor,Bufferbuffer,Datum*datum,
50+
char*nullv,FuncIndexInfoPtrfInfo);
51+
52+
externvoidUpdateStats(Oidrelid,longreltuples,boolhasindex);
53+
54+
externvoidFillDummyExprContext(ExprContext*econtext,TupleTableSlot*slot,
55+
TupleDesctupdesc,Bufferbuffer);
56+
57+
externvoidindex_build(RelationheapRelation,RelationindexRelation,
58+
intnumberOfAttributes,AttrNumberattributeNumber[],
59+
uint16parameterCount,Datum*parameter,FuncIndexInfo*funcInfo,
60+
PredInfo*predInfo);
61+
62+
#endif/* INDEX_H */

‎src/include/catalog/indexing.h

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
/*-------------------------------------------------------------------------
2+
*
3+
* indexing.h--
4+
* This include provides some definitions to support indexing
5+
* on system catalogs
6+
*
7+
*
8+
* Copyright (c) 1994, Regents of the University of California
9+
*
10+
* $Id: indexing.h,v 1.1 1996/08/28 01:56:29 scrappy Exp $
11+
*
12+
*-------------------------------------------------------------------------
13+
*/
14+
#ifndefINDEXING_H
15+
#defineINDEXING_H
16+
17+
#include"utils/rel.h"
18+
19+
/*
20+
* Some definitions for indices on pg_attribute
21+
*/
22+
#defineNum_pg_attr_indices3
23+
#defineNum_pg_proc_indices3
24+
#defineNum_pg_type_indices2
25+
#defineNum_pg_class_indices2
26+
27+
28+
/*
29+
* Names of indices on system catalogs
30+
*/
31+
#defineAttributeNameIndex "pg_attnameind"
32+
#defineAttributeNumIndex "pg_attnumind"
33+
#defineAttributeRelidIndex "pg_attrelidind"
34+
#defineProcedureNameIndex "pg_procnameind"
35+
#defineProcedureOidIndex "pg_procidind"
36+
#defineProcedureSrcIndex "pg_procsrcind"
37+
#defineTypeNameIndex "pg_typenameind"
38+
#defineTypeOidIndex "pg_typeidind"
39+
#defineClassNameIndex "pg_classnameind"
40+
#defineClassOidIndex "pg_classoidind"
41+
42+
externchar*Name_pg_attr_indices[];
43+
externchar*Name_pg_proc_indices[];
44+
externchar*Name_pg_type_indices[];
45+
externchar*Name_pg_class_indices[];
46+
47+
externchar*IndexedCatalogNames[];
48+
49+
/*
50+
* indexing.c prototypes
51+
*
52+
* Functions for each index to perform the necessary scan on a cache miss.
53+
*/
54+
externvoidCatalogOpenIndices(intnIndices,char*names[],Relationidescs[]);
55+
externvoidCatalogCloseIndices(intnIndices,Relation*idescs);
56+
externvoidCatalogIndexInsert(Relation*idescs,
57+
intnIndices,
58+
RelationheapRelation,
59+
HeapTupleheapTuple);
60+
externboolCatalogHasIndex(char*catName,OidcatId);
61+
62+
externHeapTupleAttributeNameIndexScan(RelationheapRelation,
63+
Oidrelid,
64+
char*attname);
65+
66+
externHeapTupleAttributeNumIndexScan(RelationheapRelation,
67+
Oidrelid,
68+
AttrNumberattnum);
69+
externHeapTupleProcedureOidIndexScan(RelationheapRelation,OidprocId);
70+
externHeapTupleProcedureNameIndexScan(RelationheapRelation,
71+
char*procName,intnargs,Oid*argTypes);
72+
externHeapTupleProcedureSrcIndexScan(RelationheapRelation,text*procSrc);
73+
externHeapTupleTypeOidIndexScan(RelationheapRelation,OidtypeId);
74+
externHeapTupleTypeNameIndexScan(RelationheapRelation,char*typeName);
75+
externHeapTupleClassNameIndexScan(RelationheapRelation,char*relName);
76+
externHeapTupleClassOidIndexScan(RelationheapRelation,OidrelId);
77+
78+
79+
/*
80+
* What follows are lines processed by genbki.sh to create the statements
81+
* the bootstrap parser will turn into DefineIndex commands.
82+
*
83+
* The keyword is DECLARE_INDEX every thing after that is just like in a
84+
* normal specification of the 'define index' POSTQUEL command.
85+
*/
86+
DECLARE_INDEX(pg_attnameindonpg_attributeusingbtree (mkoidname(attrelid,attname)oidname_ops));
87+
DECLARE_INDEX(pg_attnumindonpg_attributeusingbtree (mkoidint2(attrelid,attnum)oidint2_ops));
88+
DECLARE_INDEX(pg_attrelidindonpg_attributeusingbtree (attrelidoid_ops));
89+
90+
DECLARE_INDEX(pg_procidindonpg_procusingbtree (Oidoid_ops));
91+
DECLARE_INDEX(pg_procnameindonpg_procusingbtree (pronamename_ops));
92+
DECLARE_INDEX(pg_procsrcindonpg_procusingbtree (prosrctext_ops));
93+
94+
DECLARE_INDEX(pg_typeidindonpg_typeusingbtree (Oidoid_ops));
95+
DECLARE_INDEX(pg_typenameindonpg_typeusingbtree (typnamename_ops));
96+
97+
DECLARE_INDEX(pg_classnameindonpg_classusingbtree (relnamename_ops));
98+
DECLARE_INDEX(pg_classoidindonpg_classusingbtree (Oidoid_ops));
99+
100+
/* now build indices in the initialization scripts */
101+
BUILD_INDICES
102+
103+
#endif/* INDEXING_H */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp