summaryrefslogtreecommitdiff
path: root/src/backend/optimizer/plan/subselect.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-04-29 22:13:11 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-04-29 22:13:11 +0000
commitaa282d44464df0fbfa0672dc353d36734ec1092e (patch)
treedbf42be31346c6716bc33e73e801cda670fc60e4 /src/backend/optimizer/plan/subselect.c
parent19141f558411e96446294baf240eaeccf6d68b64 (diff)
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/plan/subselect.c')
-rw-r--r--src/backend/optimizer/plan/subselect.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/backend/optimizer/plan/subselect.c b/src/backend/optimizer/plan/subselect.c
index 15d16d00221..4be69d77cfd 100644
--- a/src/backend/optimizer/plan/subselect.c
+++ b/src/backend/optimizer/plan/subselect.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/subselect.c,v 1.74 2003/04/08 23:20:01 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/subselect.c,v 1.75 2003/04/29 22:13:09 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -495,10 +495,13 @@ convert_sublink_opers(List *lefthand, List *operOids,
* Make the expression node.
*
* Note: we use make_op_expr in case runtime type conversion
- * function calls must be inserted for this operator!
+ * function calls must be inserted for this operator! (But we
+ * are not expecting to have to resolve unknown Params, so
+ * it's okay to pass a null pstate.)
*/
result = lappend(result,
- make_op_expr(tup,
+ make_op_expr(NULL,
+ tup,
leftop,
rightop,
exprType(leftop),