From aa282d44464df0fbfa0672dc353d36734ec1092e Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 29 Apr 2003 22:13:11 +0000 Subject: Infrastructure for deducing Param types from context, in the same way that the types of untyped string-literal constants are deduced (ie, when coerce_type is applied to 'em, that's what the type must be). Remove the ancient hack of storing the input Param-types array as a global variable, and put the info into ParseState instead. This touches a lot of files because of adjustment of routine parameter lists, but it's really not a large patch. Note: PREPARE statement still insists on exact specification of parameter types, but that could easily be relaxed now, if we wanted to do so. --- src/include/parser/parse_oper.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/include/parser/parse_oper.h') diff --git a/src/include/parser/parse_oper.h b/src/include/parser/parse_oper.h index 2cde7189dda..6d2268bf557 100644 --- a/src/include/parser/parse_oper.h +++ b/src/include/parser/parse_oper.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: parse_oper.h,v 1.24 2003/04/08 23:20:04 tgl Exp $ + * $Id: parse_oper.h,v 1.25 2003/04/29 22:13:11 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -15,7 +15,8 @@ #define PARSE_OPER_H #include "access/htup.h" -#include "nodes/parsenodes.h" +#include "parser/parse_node.h" + typedef HeapTuple Operator; @@ -50,8 +51,10 @@ extern Oid oprid(Operator op); extern Oid oprfuncid(Operator op); /* Build expression tree for an operator invocation */ -extern Expr *make_op(List *opname, Node *ltree, Node *rtree); -extern Expr *make_op_expr(Operator op, Node *ltree, Node *rtree, +extern Expr *make_op(ParseState *pstate, List *opname, + Node *ltree, Node *rtree); +extern Expr *make_op_expr(ParseState *pstate, Operator op, + Node *ltree, Node *rtree, Oid ltypeId, Oid rtypeId); #endif /* PARSE_OPER_H */ -- cgit v1.2.3