PostgreSQL Source Code: src/include/parser/parse_func.h Source File

PostgreSQL Source Code git master
parse_func.h
Go to the documentation of this file.
1/*-------------------------------------------------------------------------
2 *
3 * parse_func.h
4 *
5 *
6 *
7 * Portions Copyright (c) 1996-2025, 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 */
22 typedef 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 */
31} FuncDetailCode;
32
33
34extern Node *ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs,
35 Node *last_srf, FuncCall *fn, bool proc_call,
36 int location);
37
38extern FuncDetailCode func_get_detail(List *funcname,
39 List *fargs, List *fargnames,
40 int nargs, Oid *argtypes,
41 bool expand_variadic, bool expand_defaults,
42 bool include_out_arguments,
43 int *fgc_flags,
44 Oid *funcid, Oid *rettype,
45 bool *retset, int *nvargs, Oid *vatype,
46 Oid **true_typeids, List **argdefaults);
47
48extern int func_match_argtypes(int nargs,
49 Oid *input_typeids,
50 FuncCandidateList raw_candidates,
51 FuncCandidateList *candidates);
52
53extern FuncCandidateList func_select_candidate(int nargs,
54 Oid *input_typeids,
55 FuncCandidateList candidates);
56
57extern void make_fn_arguments(ParseState *pstate,
58 List *fargs,
59 Oid *actual_arg_types,
60 Oid *declared_arg_types);
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);
69extern Oid LookupFuncWithArgs(ObjectType objtype, ObjectWithArgs *func,
70 bool missing_ok);
71
72extern void check_srf_call_placement(ParseState *pstate, Node *last_srf,
73 int location);
74
75#endif /* PARSE_FUNC_H */
#define funcname
Definition: indent_codes.h:69
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)
Definition: parse_func.c:1513
const char * funcname_signature_string(const char *funcname, int nargs, List *argnames, const Oid *argtypes)
Definition: parse_func.c:2116
void make_fn_arguments(ParseState *pstate, List *fargs, Oid *actual_arg_types, Oid *declared_arg_types)
Definition: parse_func.c:1948
FuncCandidateList func_select_candidate(int nargs, Oid *input_typeids, FuncCandidateList candidates)
Definition: parse_func.c:1121
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)
Definition: parse_func.c:2153
void check_srf_call_placement(ParseState *pstate, Node *last_srf, int location)
Definition: parse_func.c:2636
Oid LookupFuncWithArgs(ObjectType objtype, ObjectWithArgs *func, bool missing_ok)
Definition: parse_func.c:2331
int func_match_argtypes(int nargs, Oid *input_typeids, FuncCandidateList raw_candidates, FuncCandidateList *candidates)
Definition: parse_func.c:1036
Oid LookupFuncName(List *funcname, int nargs, const Oid *argtypes, bool missing_ok)
Definition: parse_func.c:2269
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
Definition: parsenodes.h:2324
unsigned int Oid
Definition: postgres_ext.h:32
Definition: pg_list.h:54
Definition: nodes.h:135
static void * fn(void *arg)
Definition: thread-alloc.c:119

AltStyle によって変換されたページ (->オリジナル) /