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/analyze.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/include/parser/analyze.h') diff --git a/src/include/parser/analyze.h b/src/include/parser/analyze.h index f780ec4d29..b7d6a7d665 100644 --- a/src/include/parser/analyze.h +++ b/src/include/parser/analyze.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: analyze.h,v 1.20 2002/06/20 20:29:51 momjian Exp $ + * $Id: analyze.h,v 1.21 2003/04/29 22:13:11 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -15,7 +15,11 @@ #include "parser/parse_node.h" -extern List *parse_analyze(Node *parseTree, ParseState *parentParseState); + +extern List *parse_analyze(Node *parseTree, Oid *paramTypes, int numParams); +extern List *parse_analyze_varparams(Node *parseTree, Oid **paramTypes, + int *numParams); +extern List *parse_sub_analyze(Node *parseTree, ParseState *parentParseState); extern List *analyzeCreateSchemaStmt(CreateSchemaStmt *stmt); extern void CheckSelectForUpdate(Query *qry); -- cgit v1.2.1