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/prep/prepunion.c | |
parent | 19141f558411e96446294baf240eaeccf6d68b64 (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/prep/prepunion.c')
-rw-r--r-- | src/backend/optimizer/prep/prepunion.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/optimizer/prep/prepunion.c b/src/backend/optimizer/prep/prepunion.c index fb7bf9e7070..d2b91c2ec6d 100644 --- a/src/backend/optimizer/prep/prepunion.c +++ b/src/backend/optimizer/prep/prepunion.c @@ -14,7 +14,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.93 2003/04/24 23:43:09 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.94 2003/04/29 22:13:09 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -418,7 +418,8 @@ generate_setop_tlist(List *colTypes, int flag, } else { - expr = coerce_to_common_type(expr, + expr = coerce_to_common_type(NULL, /* no UNKNOWNs here */ + expr, colType, "UNION/INTERSECT/EXCEPT"); colTypmod = -1; |