summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorPeter Eisentraut2016-12-28 17:00:00 +0000
committerPeter Eisentraut2017-03-06 18:31:47 +0000
commit2ca64c6f7105f97ce886bdbbd880f50225bf24ba (patch)
tree711fe393b0a128f5a905fbdf1991fa6f54e837c4 /src/include
parent8b6d6cf853aab12f0dc2adba7c99c3e458662734 (diff)
Replace LookupFuncNameTypeNames() with LookupFuncWithArgs()
The old function took function name and function argument list as separate arguments. Now that all function signatures are passed around as ObjectWithArgs structs, this is no longer necessary and can be replaced by a function that takes ObjectWithArgs directly. Similarly for aggregates and operators. Reviewed-by: Jim Nasby <Jim.Nasby@BlueTreble.com> Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/nodes/parsenodes.h7
-rw-r--r--src/include/parser/parse_func.h4
-rw-r--r--src/include/parser/parse_oper.h5
3 files changed, 6 insertions, 10 deletions
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index 7c7530bd3f1..956f99830ca 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -2418,9 +2418,7 @@ typedef struct CreateOpClassItem
{
NodeTag type;
int itemtype; /* see codes above */
- /* fields used for an operator or function item: */
- List *name; /* operator or function name */
- List *args; /* argument types */
+ ObjectWithArgs *name; /* operator or function name and args */
int number; /* strategy num or support proc num */
List *order_family; /* only used for ordering operators */
List *class_args; /* amproclefttype/amprocrighttype or
@@ -2730,8 +2728,7 @@ typedef struct AlterOwnerStmt
typedef struct AlterOperatorStmt
{
NodeTag type;
- List *opername; /* operator name */
- List *operargs; /* operator's argument TypeNames */
+ ObjectWithArgs *opername; /* operator name and argument types */
List *options; /* List of DefElem nodes */
} AlterOperatorStmt;
diff --git a/src/include/parser/parse_func.h b/src/include/parser/parse_func.h
index 1c914065c08..8ccf7a95383 100644
--- a/src/include/parser/parse_func.h
+++ b/src/include/parser/parse_func.h
@@ -62,9 +62,9 @@ extern const char *func_signature_string(List *funcname, int nargs,
extern Oid LookupFuncName(List *funcname, int nargs, const Oid *argtypes,
bool noError);
-extern Oid LookupFuncNameTypeNames(List *funcname, List *argtypes,
+extern Oid LookupFuncWithArgs(ObjectWithArgs *func,
bool noError);
-extern Oid LookupAggNameTypeNames(List *aggname, List *argtypes,
+extern Oid LookupAggWithArgs(ObjectWithArgs *agg,
bool noError);
extern void check_srf_call_placement(ParseState *pstate, int location);
diff --git a/src/include/parser/parse_oper.h b/src/include/parser/parse_oper.h
index b8d46637bec..a8f75b5921e 100644
--- a/src/include/parser/parse_oper.h
+++ b/src/include/parser/parse_oper.h
@@ -15,6 +15,7 @@
#define PARSE_OPER_H
#include "access/htup.h"
+#include "nodes/parsenodes.h"
#include "parser/parse_node.h"
@@ -24,9 +25,7 @@ typedef HeapTuple Operator;
extern Oid LookupOperName(ParseState *pstate, List *opername,
Oid oprleft, Oid oprright,
bool noError, int location);
-extern Oid LookupOperNameTypeNames(ParseState *pstate, List *opername,
- TypeName *oprleft, TypeName *oprright,
- bool noError, int location);
+extern Oid LookupOperWithArgs(ObjectWithArgs *oper, bool noError);
/* Routines to find operators matching a name and given input types */
/* NB: the selected operator may require coercion of the input types! */