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/backend/executor/spi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/backend/executor/spi.c') diff --git a/src/backend/executor/spi.c b/src/backend/executor/spi.c index 218b56a601..aca27d0aeb 100644 --- a/src/backend/executor/spi.c +++ b/src/backend/executor/spi.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/spi.c,v 1.92 2003/04/29 03:21:29 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/spi.c,v 1.93 2003/04/29 22:13:09 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -993,7 +993,7 @@ _SPI_execute(const char *src, int tcount, _SPI_plan *plan) /* * Parse the request string into a list of raw parse trees. */ - raw_parsetree_list = pg_parse_query(src, argtypes, nargs); + raw_parsetree_list = pg_parse_query(src); /* * Do parse analysis and rule rewrite for each raw parsetree. @@ -1036,7 +1036,7 @@ _SPI_execute(const char *src, int tcount, _SPI_plan *plan) if (plan) plan->origCmdType = origCmdType; - query_list = pg_analyze_and_rewrite(parsetree); + query_list = pg_analyze_and_rewrite(parsetree, argtypes, nargs); query_list_list = lappend(query_list_list, query_list); -- cgit v1.2.1