1 /*-------------------------------------------------------------------------
7 * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * $Id: parse_func.h,v 1.34 2001/10/28 06:26:08 momjian Exp $
12 *-------------------------------------------------------------------------
17 #include "parser/parse_node.h"
20 * This structure is used to explore the inheritance hierarchy above
21 * nodes in the type tree in order to disambiguate among polymorphic
24 typedef struct _InhPaths
26 int nsupers; /* number of superclasses */
27 Oid self; /* this class */
28 Oid *supervec; /* vector of superclasses */
32 * This structure holds a list of possible functions or operators that
33 * agree with the known name and argument types of the function/operator.
35 typedef struct _CandidateList
38 struct _CandidateList *next;
41 /* Result codes for func_get_detail */
44 FUNCDETAIL_NOTFOUND, /* no suitable interpretation */
45 FUNCDETAIL_NORMAL, /* found a matching function */
46 FUNCDETAIL_COERCION /* it's a type coercion request */
50 extern Node *ParseNestedFuncOrColumn(ParseState *pstate, Attr *attr,
52 extern Node *ParseFuncOrColumn(ParseState *pstate,
53 char *funcname, List *fargs,
54 bool agg_star, bool agg_distinct,
57 extern FuncDetailCode func_get_detail(char *funcname, List *fargs,
58 int nargs, Oid *argtypes,
59 Oid *funcid, Oid *rettype,
60 bool *retset, Oid **true_typeids);
62 extern bool typeInheritsFrom(Oid subclassTypeId, Oid superclassTypeId);
64 extern void func_error(char *caller, char *funcname,
65 int nargs, Oid *argtypes, char *msg);
67 #endif /* PARSE_FUNC_H */