mirror of
https://github.com/postgres/postgres.git
synced 2025-11-12 05:01:15 +03:00
Generate fmgr prototypes automatically
Gen_fmgrtab.pl creates a new file fmgrprotos.h, which contains prototypes for all functions registered in pg_proc.h. This avoids having to manually maintain these prototypes across a random variety of header files. It also automatically enforces a correct function signature, and since there are warnings about missing prototypes, it will detect functions that are defined but not registered in pg_proc.h (or otherwise used). Reviewed-by: Pavel Stehule <pavel.stehule@gmail.com>
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#include "pgstat.h"
|
||||
#include "storage/bufmgr.h"
|
||||
#include "storage/freespace.h"
|
||||
#include "utils/builtins.h"
|
||||
#include "utils/index_selfuncs.h"
|
||||
#include "utils/memutils.h"
|
||||
#include "utils/rel.h"
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "access/skey.h"
|
||||
#include "catalog/pg_amop.h"
|
||||
#include "catalog/pg_type.h"
|
||||
#include "utils/builtins.h"
|
||||
#include "utils/datum.h"
|
||||
#include "utils/lsyscache.h"
|
||||
#include "utils/rel.h"
|
||||
@@ -76,10 +77,6 @@ typedef struct InclusionOpaque
|
||||
FmgrInfo strategy_procinfos[RTMaxStrategyNumber];
|
||||
} InclusionOpaque;
|
||||
|
||||
Datum brin_inclusion_opcinfo(PG_FUNCTION_ARGS);
|
||||
Datum brin_inclusion_add_value(PG_FUNCTION_ARGS);
|
||||
Datum brin_inclusion_consistent(PG_FUNCTION_ARGS);
|
||||
Datum brin_inclusion_union(PG_FUNCTION_ARGS);
|
||||
static FmgrInfo *inclusion_get_procinfo(BrinDesc *bdesc, uint16 attno,
|
||||
uint16 procnum);
|
||||
static FmgrInfo *inclusion_get_strategy_procinfo(BrinDesc *bdesc, uint16 attno,
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "access/stratnum.h"
|
||||
#include "catalog/pg_type.h"
|
||||
#include "catalog/pg_amop.h"
|
||||
#include "utils/builtins.h"
|
||||
#include "utils/datum.h"
|
||||
#include "utils/lsyscache.h"
|
||||
#include "utils/rel.h"
|
||||
@@ -28,10 +29,6 @@ typedef struct MinmaxOpaque
|
||||
FmgrInfo strategy_procinfos[BTMaxStrategyNumber];
|
||||
} MinmaxOpaque;
|
||||
|
||||
Datum brin_minmax_opcinfo(PG_FUNCTION_ARGS);
|
||||
Datum brin_minmax_add_value(PG_FUNCTION_ARGS);
|
||||
Datum brin_minmax_consistent(PG_FUNCTION_ARGS);
|
||||
Datum brin_minmax_union(PG_FUNCTION_ARGS);
|
||||
static FmgrInfo *minmax_get_strategy_procinfo(BrinDesc *bdesc, uint16 attno,
|
||||
Oid subtype, uint16 strategynum);
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "postmaster/autovacuum.h"
|
||||
#include "storage/indexfsm.h"
|
||||
#include "storage/lmgr.h"
|
||||
#include "utils/builtins.h"
|
||||
|
||||
/* GUC parameter */
|
||||
int gin_pending_list_limit = 0;
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "access/gistscan.h"
|
||||
#include "catalog/pg_collation.h"
|
||||
#include "miscadmin.h"
|
||||
#include "utils/builtins.h"
|
||||
#include "utils/index_selfuncs.h"
|
||||
#include "utils/memutils.h"
|
||||
#include "utils/rel.h"
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "commands/vacuum.h"
|
||||
#include "miscadmin.h"
|
||||
#include "optimizer/plancat.h"
|
||||
#include "utils/builtins.h"
|
||||
#include "utils/index_selfuncs.h"
|
||||
#include "utils/rel.h"
|
||||
|
||||
|
||||
@@ -27,7 +27,17 @@
|
||||
#include "postgres.h"
|
||||
|
||||
#include "access/hash.h"
|
||||
#include "utils/builtins.h"
|
||||
|
||||
/*
|
||||
* Datatype-specific hash functions.
|
||||
*
|
||||
* These support both hash indexes and hash joins.
|
||||
*
|
||||
* NOTE: some of these are also used by catcache operations, without
|
||||
* any direct connection to hash indexes. Also, the common hash_any
|
||||
* routine is also used by dynahash tables.
|
||||
*/
|
||||
|
||||
/* Note: this is used for both "char" and boolean datatypes */
|
||||
Datum
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "access/htup_details.h"
|
||||
#include "catalog/pg_am.h"
|
||||
#include "catalog/pg_opclass.h"
|
||||
#include "utils/builtins.h"
|
||||
#include "utils/syscache.h"
|
||||
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "storage/lmgr.h"
|
||||
#include "storage/smgr.h"
|
||||
#include "tcop/tcopprot.h" /* pgrminclude ignore */
|
||||
#include "utils/builtins.h"
|
||||
#include "utils/index_selfuncs.h"
|
||||
#include "utils/memutils.h"
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "storage/bufmgr.h"
|
||||
#include "storage/indexfsm.h"
|
||||
#include "storage/lmgr.h"
|
||||
#include "utils/builtins.h"
|
||||
#include "utils/index_selfuncs.h"
|
||||
#include "utils/lsyscache.h"
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
|
||||
#include "access/htup_details.h"
|
||||
#include "access/xlog.h"
|
||||
#include "access/xlog_fn.h"
|
||||
#include "access/xlog_internal.h"
|
||||
#include "access/xlogutils.h"
|
||||
#include "catalog/catalog.h"
|
||||
|
||||
Reference in New Issue
Block a user