1
/*-------------------------------------------------------------------------
7
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
8
* Portions Copyright (c) 1994, Regents of the University of California
12
*-------------------------------------------------------------------------
17
#include "catalog/namespace.h"
18
#include "parser/parse_node.h"
22
* This structure is used to explore the inheritance hierarchy above
23
* nodes in the type tree in order to disambiguate among polymorphic
26
typedef struct _InhPaths
28
int nsupers; /* number of superclasses */
29
Oid self; /* this class */
30
Oid *supervec; /* vector of superclasses */
33
/* Result codes for func_get_detail */
36
FUNCDETAIL_NOTFOUND, /* no matching function */
37
FUNCDETAIL_MULTIPLE, /* too many matching functions */
38
FUNCDETAIL_NORMAL, /* found a matching regular function */
39
FUNCDETAIL_AGGREGATE, /* found a matching aggregate function */
40
FUNCDETAIL_WINDOWFUNC, /* found a matching window function */
41
FUNCDETAIL_COERCION /* it's a type coercion request */
45
extern Node *ParseFuncOrColumn(ParseState *pstate,
46
List *funcname, List *fargs,
47
bool agg_star, bool agg_distinct, bool func_variadic,
48
WindowDef *over, bool is_column, int location);
50
extern FuncDetailCode func_get_detail(List *funcname, List *fargs,
51
int nargs, Oid *argtypes,
52
bool expand_variadic, bool expand_defaults,
53
Oid *funcid, Oid *rettype,
54
bool *retset, int *nvargs, Oid **true_typeids,
57
extern int func_match_argtypes(int nargs,
59
FuncCandidateList raw_candidates,
60
FuncCandidateList *candidates);
62
extern FuncCandidateList func_select_candidate(int nargs,
64
FuncCandidateList candidates);
66
extern bool typeInheritsFrom(Oid subclassTypeId, Oid superclassTypeId);
68
extern void make_fn_arguments(ParseState *pstate,
70
Oid *actual_arg_types,
71
Oid *declared_arg_types);
73
extern const char *funcname_signature_string(const char *funcname,
74
int nargs, const Oid *argtypes);
75
extern const char *func_signature_string(List *funcname,
76
int nargs, const Oid *argtypes);
78
extern Oid LookupFuncName(List *funcname, int nargs, const Oid *argtypes,
80
extern Oid LookupFuncNameTypeNames(List *funcname, List *argtypes,
82
extern Oid LookupAggNameTypeNames(List *aggname, List *argtypes,
85
#endif /* PARSE_FUNC_H */