PostgreSQL Source Code git master
Loading...
Searching...
No Matches
parse_func.h
Go to the documentation of this file.
1/*-------------------------------------------------------------------------
2 *
3 * parse_func.h
4 *
5 *
6 *
7 * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
9 *
10 * src/include/parser/parse_func.h
11 *
12 *-------------------------------------------------------------------------
13 */
14#ifndef PARSE_FUNC_H
15#define PARSE_FUNC_H
16
17#include "catalog/namespace.h"
18#include "parser/parse_node.h"
19
20
21/* Result codes for func_get_detail */
22typedef enum
23{
24 FUNCDETAIL_NOTFOUND, /* no matching function */
25 FUNCDETAIL_MULTIPLE, /* too many matching functions */
26 FUNCDETAIL_NORMAL, /* found a matching regular function */
27 FUNCDETAIL_PROCEDURE, /* found a matching procedure */
28 FUNCDETAIL_AGGREGATE, /* found a matching aggregate function */
29 FUNCDETAIL_WINDOWFUNC, /* found a matching window function */
30 FUNCDETAIL_COERCION, /* it's a type coercion request */
32
33
36 int location);
37
40 int nargs, Oid *argtypes,
43 int *fgc_flags,
44 Oid *funcid, Oid *rettype,
45 bool *retset, int *nvargs, Oid *vatype,
47
48extern int func_match_argtypes(int nargs,
52
56
57extern void make_fn_arguments(ParseState *pstate,
58 List *fargs,
61
62extern const char *funcname_signature_string(const char *funcname, int nargs,
63 List *argnames, const Oid *argtypes);
64extern const char *func_signature_string(List *funcname, int nargs,
65 List *argnames, const Oid *argtypes);
66
67extern Oid LookupFuncName(List *funcname, int nargs, const Oid *argtypes,
68 bool missing_ok);
70 bool missing_ok);
71
73 int location);
74
75#endif /* PARSE_FUNC_H */
#define funcname
FuncDetailCode func_get_detail(List *funcname, List *fargs, List *fargnames, int nargs, Oid *argtypes, bool expand_variadic, bool expand_defaults, bool include_out_arguments, int *fgc_flags, Oid *funcid, Oid *rettype, bool *retset, int *nvargs, Oid *vatype, Oid **true_typeids, List **argdefaults)
const char * funcname_signature_string(const char *funcname, int nargs, List *argnames, const Oid *argtypes)
void make_fn_arguments(ParseState *pstate, List *fargs, Oid *actual_arg_types, Oid *declared_arg_types)
FuncCandidateList func_select_candidate(int nargs, Oid *input_typeids, FuncCandidateList candidates)
Node * ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs, Node *last_srf, FuncCall *fn, bool proc_call, int location)
Definition parse_func.c:92
const char * func_signature_string(List *funcname, int nargs, List *argnames, const Oid *argtypes)
void check_srf_call_placement(ParseState *pstate, Node *last_srf, int location)
Oid LookupFuncWithArgs(ObjectType objtype, ObjectWithArgs *func, bool missing_ok)
int func_match_argtypes(int nargs, Oid *input_typeids, FuncCandidateList raw_candidates, FuncCandidateList *candidates)
Oid LookupFuncName(List *funcname, int nargs, const Oid *argtypes, bool missing_ok)
FuncDetailCode
Definition parse_func.h:23
@ FUNCDETAIL_MULTIPLE
Definition parse_func.h:25
@ FUNCDETAIL_NORMAL
Definition parse_func.h:26
@ FUNCDETAIL_PROCEDURE
Definition parse_func.h:27
@ FUNCDETAIL_WINDOWFUNC
Definition parse_func.h:29
@ FUNCDETAIL_NOTFOUND
Definition parse_func.h:24
@ FUNCDETAIL_COERCION
Definition parse_func.h:30
@ FUNCDETAIL_AGGREGATE
Definition parse_func.h:28
ObjectType
unsigned int Oid
static int fb(int x)
Definition pg_list.h:54
Definition nodes.h:135
static void * fn(void *arg)