mirror of
https://github.com/postgres/postgres.git
synced 2025-10-21 02:52:47 +03:00
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/20191223053434.GF34339@paquier.xyz
This commit is contained in:
@@ -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"
|
||||
|
||||
|
@@ -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"
|
||||
|
@@ -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.
|
||||
|
@@ -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,
|
||||
|
@@ -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"
|
||||
|
@@ -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 */
|
@@ -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 */
|
@@ -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 */
|
@@ -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"
|
||||
|
@@ -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"
|
||||
|
@@ -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"
|
||||
|
||||
|
Reference in New Issue
Block a user