diff options
Diffstat (limited to 'src/include/executor/functions.h')
-rw-r--r-- | src/include/executor/functions.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/include/executor/functions.h b/src/include/executor/functions.h index c975a93661e..dcb8e18437f 100644 --- a/src/include/executor/functions.h +++ b/src/include/executor/functions.h @@ -20,6 +20,21 @@ /* This struct is known only within executor/functions.c */ typedef struct SQLFunctionParseInfo *SQLFunctionParseInfoPtr; +/* + * Data structure needed by the parser callback hooks to resolve parameter + * references during parsing of a SQL function's body. This is separate from + * SQLFunctionCache since we sometimes do parsing separately from execution. + */ +typedef struct SQLFunctionParseInfo +{ + char *fname; /* function's name */ + int nargs; /* number of input arguments */ + Oid *argtypes; /* resolved types of input arguments */ + char **argnames; /* names of input arguments; NULL if none */ + /* Note that argnames[i] can be NULL, if some args are unnamed */ + Oid collation; /* function's input collation, if known */ +} SQLFunctionParseInfo; + extern Datum fmgr_sql(PG_FUNCTION_ARGS); extern SQLFunctionParseInfoPtr prepare_sql_fn_parse_info(HeapTuple procedureTuple, |