diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-04-29 22:13:11 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-04-29 22:13:11 +0000 |
commit | aa282d44464df0fbfa0672dc353d36734ec1092e (patch) | |
tree | dbf42be31346c6716bc33e73e801cda670fc60e4 /src/backend/optimizer/util/clauses.c | |
parent | 19141f558411e96446294baf240eaeccf6d68b64 (diff) | |
download | postgresql-aa282d44464df0fbfa0672dc353d36734ec1092e.tar.gz postgresql-aa282d44464df0fbfa0672dc353d36734ec1092e.zip |
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.
Diffstat (limited to 'src/backend/optimizer/util/clauses.c')
-rw-r--r-- | src/backend/optimizer/util/clauses.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/backend/optimizer/util/clauses.c b/src/backend/optimizer/util/clauses.c index 778fc3a2bb9..c0ffd939cbe 100644 --- a/src/backend/optimizer/util/clauses.c +++ b/src/backend/optimizer/util/clauses.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.135 2003/04/27 20:09:44 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.136 2003/04/29 22:13:09 tgl Exp $ * * HISTORY * AUTHOR DATE MAJOR EVENT @@ -1747,17 +1747,17 @@ inline_function(Oid funcid, Oid result_type, List *args, /* * We just do parsing and parse analysis, not rewriting, because - * rewriting will not affect SELECT-only queries, which is all that - * we care about. Also, we can punt as soon as we detect more than + * rewriting will not affect table-free-SELECT-only queries, which is all + * that we care about. Also, we can punt as soon as we detect more than * one command in the function body. */ - raw_parsetree_list = pg_parse_query(src, - funcform->proargtypes, - funcform->pronargs); + raw_parsetree_list = pg_parse_query(src); if (length(raw_parsetree_list) != 1) goto fail; - querytree_list = parse_analyze(lfirst(raw_parsetree_list), NULL); + querytree_list = parse_analyze(lfirst(raw_parsetree_list), + funcform->proargtypes, + funcform->pronargs); if (length(querytree_list) != 1) goto fail; |