summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorMichael Paquier2019-12-25 01:23:39 +0000
committerMichael Paquier2019-12-25 01:23:39 +0000
commit8ce3aa9b5914d1ac45ed3f9bc484f66b3c4850c7 (patch)
treed054ac120b8d3496bffca18bf5c165205e8f44df /src/include
parentc4dcd9144ba64946c9f9466748bdb2c51719c8a3 (diff)
Rename files and headers related to index AM
The following renaming is done so as source files related to index access methods are more consistent with table access methods (the original names used for index AMs ware too generic, and could be confused as including features related to table AMs): - amapi.h -> indexam.h. - amapi.c -> indexamapi.c. Here we have an equivalent with backend/access/table/tableamapi.c. - amvalidate.c -> indexamvalidate.c. - amvalidate.h -> indexamvalidate.h. - genam.c -> indexgenam.c. - genam.h -> indexgenam.h. This has been discussed during the development of v12 when table AM was worked on, but the renaming never happened. Author: Michael Paquier Reviewed-by: Fabien Coelho, Julien Rouhaud Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/include')
-rw-r--r--src/include/access/brin_internal.h2
-rw-r--r--src/include/access/gin_private.h2
-rw-r--r--src/include/access/gist_private.h4
-rw-r--r--src/include/access/gistscan.h2
-rw-r--r--src/include/access/hash.h2
-rw-r--r--src/include/access/indexam.h (renamed from src/include/access/amapi.h)14
-rw-r--r--src/include/access/indexamvalidate.h (renamed from src/include/access/amvalidate.h)12
-rw-r--r--src/include/access/indexgenam.h (renamed from src/include/access/genam.h)14
-rw-r--r--src/include/access/nbtree.h2
-rw-r--r--src/include/access/reloptions.h2
-rw-r--r--src/include/access/spgist.h2
-rw-r--r--src/include/executor/nodeIndexscan.h2
-rw-r--r--src/include/nodes/nodes.h2
-rw-r--r--src/include/nodes/pathnodes.h2
-rw-r--r--src/include/utils/index_selfuncs.h4
-rw-r--r--src/include/utils/rel.h2
16 files changed, 35 insertions, 35 deletions
diff --git a/src/include/access/brin_internal.h b/src/include/access/brin_internal.h
index b1c91999469..f78387d891f 100644
--- a/src/include/access/brin_internal.h
+++ b/src/include/access/brin_internal.h
@@ -11,7 +11,7 @@
#ifndef BRIN_INTERNAL_H
#define BRIN_INTERNAL_H
-#include "access/amapi.h"
+#include "access/indexam.h"
#include "storage/bufpage.h"
#include "utils/typcache.h"
diff --git a/src/include/access/gin_private.h b/src/include/access/gin_private.h
index b779cc8c7ca..8a8ab3b94eb 100644
--- a/src/include/access/gin_private.h
+++ b/src/include/access/gin_private.h
@@ -10,9 +10,9 @@
#ifndef GIN_PRIVATE_H
#define GIN_PRIVATE_H
-#include "access/amapi.h"
#include "access/gin.h"
#include "access/ginblock.h"
+#include "access/indexam.h"
#include "access/itup.h"
#include "catalog/pg_am_d.h"
#include "fmgr.h"
diff --git a/src/include/access/gist_private.h b/src/include/access/gist_private.h
index a409975db16..b89107d09ef 100644
--- a/src/include/access/gist_private.h
+++ b/src/include/access/gist_private.h
@@ -14,14 +14,14 @@
#ifndef GIST_PRIVATE_H
#define GIST_PRIVATE_H
-#include "access/amapi.h"
#include "access/gist.h"
+#include "access/indexam.h"
+#include "access/indexgenam.h"
#include "access/itup.h"
#include "lib/pairingheap.h"
#include "storage/bufmgr.h"
#include "storage/buffile.h"
#include "utils/hsearch.h"
-#include "access/genam.h"
/*
* Maximum number of "halves" a page can be split into in one operation.
diff --git a/src/include/access/gistscan.h b/src/include/access/gistscan.h
index c02445a6980..bec23b46046 100644
--- a/src/include/access/gistscan.h
+++ b/src/include/access/gistscan.h
@@ -14,7 +14,7 @@
#ifndef GISTSCAN_H
#define GISTSCAN_H
-#include "access/amapi.h"
+#include "access/indexam.h"
extern IndexScanDesc gistbeginscan(Relation r, int nkeys, int norderbys);
extern void gistrescan(IndexScanDesc scan, ScanKey key, int nkeys,
diff --git a/src/include/access/hash.h b/src/include/access/hash.h
index ba58cb31bb8..07db6466aea 100644
--- a/src/include/access/hash.h
+++ b/src/include/access/hash.h
@@ -17,7 +17,7 @@
#ifndef HASH_H
#define HASH_H
-#include "access/amapi.h"
+#include "access/indexam.h"
#include "access/itup.h"
#include "access/sdir.h"
#include "catalog/pg_am_d.h"
diff --git a/src/include/access/amapi.h b/src/include/access/indexam.h
index 6e3db06eed2..9b2eefb5319 100644
--- a/src/include/access/amapi.h
+++ b/src/include/access/indexam.h
@@ -1,18 +1,18 @@
/*-------------------------------------------------------------------------
*
- * amapi.h
+ * indexam.h
* API for Postgres index access methods.
*
* Copyright (c) 2015-2019, PostgreSQL Global Development Group
*
- * src/include/access/amapi.h
+ * src/include/access/indexam.h
*
*-------------------------------------------------------------------------
*/
-#ifndef AMAPI_H
-#define AMAPI_H
+#ifndef INDEXAM_H
+#define INDEXAM_H
-#include "access/genam.h"
+#include "access/indexgenam.h"
/*
* We don't wish to include planner header files here, since most of an index
@@ -233,8 +233,8 @@ typedef struct IndexAmRoutine
} IndexAmRoutine;
-/* Functions in access/index/amapi.c */
+/* Functions in access/index/indexamapi.c */
extern IndexAmRoutine *GetIndexAmRoutine(Oid amhandler);
extern IndexAmRoutine *GetIndexAmRoutineByAmId(Oid amoid, bool noerror);
-#endif /* AMAPI_H */
+#endif /* INDEXAM_H */
diff --git a/src/include/access/amvalidate.h b/src/include/access/indexamvalidate.h
index 317e1e68938..69a0520c0a6 100644
--- a/src/include/access/amvalidate.h
+++ b/src/include/access/indexamvalidate.h
@@ -1,16 +1,16 @@
/*-------------------------------------------------------------------------
*
- * amvalidate.h
+ * indexamvalidate.h
* Support routines for index access methods' amvalidate functions.
*
* Copyright (c) 2016-2019, PostgreSQL Global Development Group
*
- * src/include/access/amvalidate.h
+ * src/include/access/indexamvalidate.h
*
*-------------------------------------------------------------------------
*/
-#ifndef AMVALIDATE_H
-#define AMVALIDATE_H
+#ifndef INDEXAMVALIDATE_H
+#define INDEXAMVALIDATE_H
#include "utils/catcache.h"
@@ -25,7 +25,7 @@ typedef struct OpFamilyOpFuncGroup
} OpFamilyOpFuncGroup;
-/* Functions in access/index/amvalidate.c */
+/* Functions in access/index/indexamvalidate.c */
extern List *identify_opfamily_groups(CatCList *oprlist, CatCList *proclist);
extern bool check_amproc_signature(Oid funcid, Oid restype, bool exact,
int minargs, int maxargs,...);
@@ -33,4 +33,4 @@ extern bool check_amop_signature(Oid opno, Oid restype,
Oid lefttype, Oid righttype);
extern bool opfamily_can_sort_type(Oid opfamilyoid, Oid datatypeoid);
-#endif /* AMVALIDATE_H */
+#endif /* INDEXAMVALIDATE_H */
diff --git a/src/include/access/genam.h b/src/include/access/indexgenam.h
index a813b004be7..a25cf110e7e 100644
--- a/src/include/access/genam.h
+++ b/src/include/access/indexgenam.h
@@ -1,18 +1,18 @@
/*-------------------------------------------------------------------------
*
- * genam.h
+ * indexgenam.h
* POSTGRES generalized index access method definitions.
*
*
* Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * src/include/access/genam.h
+ * src/include/access/indexgenam.h
*
*-------------------------------------------------------------------------
*/
-#ifndef GENAM_H
-#define GENAM_H
+#ifndef INDEXGENAM_H
+#define INDEXGENAM_H
#include "access/sdir.h"
#include "access/skey.h"
@@ -190,7 +190,7 @@ extern void index_store_float8_orderby_distances(IndexScanDesc scan,
bool recheckOrderBy);
/*
- * index access method support routines (in genam.c)
+ * index access method support routines (in indexgenam.c)
*/
extern IndexScanDesc RelationGetIndexScan(Relation indexRelation,
int nkeys, int norderbys);
@@ -204,7 +204,7 @@ extern TransactionId index_compute_xid_horizon_for_tuples(Relation irel,
int nitems);
/*
- * heap-or-index access to system catalogs (in genam.c)
+ * heap-or-index access to system catalogs (in indexgenam.c)
*/
extern SysScanDesc systable_beginscan(Relation heapRelation,
Oid indexId,
@@ -222,4 +222,4 @@ extern HeapTuple systable_getnext_ordered(SysScanDesc sysscan,
ScanDirection direction);
extern void systable_endscan_ordered(SysScanDesc sysscan);
-#endif /* GENAM_H */
+#endif /* INDEXGENAM_H */
diff --git a/src/include/access/nbtree.h b/src/include/access/nbtree.h
index 5e56aac63f3..0bcb2ec2cd1 100644
--- a/src/include/access/nbtree.h
+++ b/src/include/access/nbtree.h
@@ -14,7 +14,7 @@
#ifndef NBTREE_H
#define NBTREE_H
-#include "access/amapi.h"
+#include "access/indexam.h"
#include "access/itup.h"
#include "access/sdir.h"
#include "access/xlogreader.h"
diff --git a/src/include/access/reloptions.h b/src/include/access/reloptions.h
index d21c513be4d..e7abb411934 100644
--- a/src/include/access/reloptions.h
+++ b/src/include/access/reloptions.h
@@ -19,8 +19,8 @@
#ifndef RELOPTIONS_H
#define RELOPTIONS_H
-#include "access/amapi.h"
#include "access/htup.h"
+#include "access/indexam.h"
#include "access/tupdesc.h"
#include "nodes/pg_list.h"
#include "storage/lock.h"
diff --git a/src/include/access/spgist.h b/src/include/access/spgist.h
index d5fd7bcc02b..1f9b9eb5e1c 100644
--- a/src/include/access/spgist.h
+++ b/src/include/access/spgist.h
@@ -14,7 +14,7 @@
#ifndef SPGIST_H
#define SPGIST_H
-#include "access/amapi.h"
+#include "access/indexam.h"
#include "access/xlogreader.h"
#include "lib/stringinfo.h"
diff --git a/src/include/executor/nodeIndexscan.h b/src/include/executor/nodeIndexscan.h
index e895ec5b7b3..dd3a3238918 100644
--- a/src/include/executor/nodeIndexscan.h
+++ b/src/include/executor/nodeIndexscan.h
@@ -14,7 +14,7 @@
#ifndef NODEINDEXSCAN_H
#define NODEINDEXSCAN_H
-#include "access/genam.h"
+#include "access/indexgenam.h"
#include "access/parallel.h"
#include "nodes/execnodes.h"
diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h
index bce2d59b0db..8692a32172f 100644
--- a/src/include/nodes/nodes.h
+++ b/src/include/nodes/nodes.h
@@ -504,7 +504,7 @@ typedef enum NodeTag
T_TIDBitmap, /* in nodes/tidbitmap.h */
T_InlineCodeBlock, /* in nodes/parsenodes.h */
T_FdwRoutine, /* in foreign/fdwapi.h */
- T_IndexAmRoutine, /* in access/amapi.h */
+ T_IndexAmRoutine, /* in access/indexam.h */
T_TableAmRoutine, /* in access/tableam.h */
T_TsmRoutine, /* in access/tsmapi.h */
T_ForeignKeyCacheInfo, /* in utils/rel.h */
diff --git a/src/include/nodes/pathnodes.h b/src/include/nodes/pathnodes.h
index 31b631cfe0f..6fe1ba9a963 100644
--- a/src/include/nodes/pathnodes.h
+++ b/src/include/nodes/pathnodes.h
@@ -836,7 +836,7 @@ struct IndexOptInfo
bool amhasgettuple; /* does AM have amgettuple interface? */
bool amhasgetbitmap; /* does AM have amgetbitmap interface? */
bool amcanparallel; /* does AM support parallel scan? */
- /* Rather than include amapi.h here, we declare amcostestimate like this */
+ /* Rather than include indexam.h here, we declare amcostestimate like this */
void (*amcostestimate) (); /* AM's cost estimator */
};
diff --git a/src/include/utils/index_selfuncs.h b/src/include/utils/index_selfuncs.h
index b81556d7a1e..2a15f5abf61 100644
--- a/src/include/utils/index_selfuncs.h
+++ b/src/include/utils/index_selfuncs.h
@@ -6,7 +6,7 @@
*
* Note: this is split out of selfuncs.h mainly to avoid importing all of the
* planner's data structures into the non-planner parts of the index AMs.
- * If you make it depend on anything besides access/amapi.h, that's likely
+ * If you make it depend on anything besides access/indexam.h, that's likely
* a mistake.
*
* Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
@@ -19,7 +19,7 @@
#ifndef INDEX_SELFUNCS_H
#define INDEX_SELFUNCS_H
-#include "access/amapi.h"
+#include "access/indexam.h"
/* Functions in selfuncs.c */
extern void brincostestimate(struct PlannerInfo *root,
diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h
index 31d8a1a10e7..2752eacc9fb 100644
--- a/src/include/utils/rel.h
+++ b/src/include/utils/rel.h
@@ -153,7 +153,7 @@ typedef struct RelationData
* identifier given that restriction.
*/
MemoryContext rd_indexcxt; /* private memory cxt for this stuff */
- /* use "struct" here to avoid needing to include amapi.h: */
+ /* use "struct" here to avoid needing to include indexam.h: */
struct IndexAmRoutine *rd_indam; /* index AM's API struct */
Oid *rd_opfamily; /* OIDs of op families for each index col */
Oid *rd_opcintype; /* OIDs of opclass declared input data types */