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.36 2002/03/21 16:02:01 tgl 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 *ParseFuncOrColumn(ParseState *pstate,
51 char *funcname, List *fargs,
52 bool agg_star, bool agg_distinct, bool is_column);
54 extern FuncDetailCode func_get_detail(char *funcname, List *fargs,
55 int nargs, Oid *argtypes,
56 Oid *funcid, Oid *rettype,
57 bool *retset, Oid **true_typeids);
59 extern bool typeInheritsFrom(Oid subclassTypeId, Oid superclassTypeId);
61 extern void func_error(char *caller, char *funcname,
62 int nargs, Oid *argtypes, char *msg);
64 #endif /* PARSE_FUNC_H */