diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-05-28 17:56:29 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-05-28 17:56:29 +0000 |
| commit | 0a7fb4e9184539afcb6fed0f1d2bc0abddc2b0a6 (patch) | |
| tree | affcce1c5b6367468fb6dcfd2790585f2e967629 /src/include/utils/fmgrtab.h | |
| parent | 5005bb060b3f3a82cd1bd662c7f8946c9be59db5 (diff) | |
| download | postgresql-0a7fb4e9184539afcb6fed0f1d2bc0abddc2b0a6.tar.gz | |
First round of changes for new fmgr interface. fmgr itself and the
key call sites are changed, but most called functions are still oldstyle.
An exception is that the PL managers are updated (so, for example, NULL
handling now behaves as expected in plperl and plpgsql functions).
NOTE initdb is forced due to added column in pg_proc.
Diffstat (limited to 'src/include/utils/fmgrtab.h')
| -rw-r--r-- | src/include/utils/fmgrtab.h | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/src/include/utils/fmgrtab.h b/src/include/utils/fmgrtab.h index 21e28904d5..e6cfe51965 100644 --- a/src/include/utils/fmgrtab.h +++ b/src/include/utils/fmgrtab.h @@ -1,30 +1,39 @@ /*------------------------------------------------------------------------- * * fmgrtab.h - * - * + * The function manager's table of internal functions. * * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: fmgrtab.h,v 1.12 2000/01/26 05:58:38 momjian Exp $ + * $Id: fmgrtab.h,v 1.13 2000/05/28 17:56:20 tgl Exp $ * *------------------------------------------------------------------------- */ #ifndef FMGRTAB_H #define FMGRTAB_H +#include "fmgr.h" + + +/* + * This table stores info about all the built-in functions (ie, functions + * that are compiled into the Postgres executable). The table entries are + * required to appear in Oid order, so that binary search can be used. + */ typedef struct { - Oid proid; - int nargs; - func_ptr func; - char *funcName; -} FmgrCall; + Oid foid; /* OID of the function */ + const char *funcName; /* C name of the function */ + short nargs; /* 0..FUNC_MAX_ARGS, or -1 if variable count */ + bool strict; /* T if function is "strict" */ + bool oldstyle; /* T if function uses old fmgr interface */ + PGFunction func; /* pointer to compiled function */ +} FmgrBuiltin; + +extern const FmgrBuiltin fmgr_builtins[]; -extern FmgrCall *fmgr_isbuiltin(Oid id); -extern func_ptr fmgr_lookupByName(char *name); -extern void load_file(char *filename); +extern const int fmgr_nbuiltins; /* number of entries in table */ #endif /* FMGRTAB_H */ |
