PostgreSQL Source Code  git master
fmgrtab.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * fmgrtab.h
4  * The function manager's table of internal functions.
5  *
6  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
7  * Portions Copyright (c) 1994, Regents of the University of California
8  *
9  * src/include/utils/fmgrtab.h
10  *
11  *-------------------------------------------------------------------------
12  */
13 #ifndef FMGRTAB_H
14 #define FMGRTAB_H
15 
16 #include "access/transam.h"
17 #include "fmgr.h"
18 
19 
20 /*
21  * This table stores info about all the built-in functions (ie, functions
22  * that are compiled into the Postgres executable).
23  */
24 
25 typedef struct
26 {
27  Oid foid; /* OID of the function */
28  const char *funcName; /* C name of the function */
29  short nargs; /* 0..FUNC_MAX_ARGS, or -1 if variable count */
30  bool strict; /* T if function is "strict" */
31  bool retset; /* T if function returns a set */
32  PGFunction func; /* pointer to compiled function */
33 } FmgrBuiltin;
34 
35 extern const FmgrBuiltin fmgr_builtins[];
36 
37 extern const int fmgr_nbuiltins; /* number of entries in table */
38 
39 /*
40  * Mapping from a builtin function's oid to the index in the fmgr_builtins
41  * array.
42  */
43 #define InvalidOidBuiltinMapping PG_UINT16_MAX
45 
46 #endif /* FMGRTAB_H */
bool strict
Definition: fmgrtab.h:30
Datum(* PGFunction)(FunctionCallInfo fcinfo)
Definition: fmgr.h:40
Oid foid
Definition: fmgrtab.h:27
short nargs
Definition: fmgrtab.h:29
const int fmgr_nbuiltins
const uint16 fmgr_builtin_oid_index[FirstBootstrapObjectId]
const FmgrBuiltin fmgr_builtins[]
unsigned int Oid
Definition: postgres_ext.h:31
const char * funcName
Definition: fmgrtab.h:28
PGFunction func
Definition: fmgrtab.h:32
unsigned short uint16
Definition: c.h:295
#define FirstBootstrapObjectId
Definition: transam.h:93
bool retset
Definition: fmgrtab.h:31