]> granicus.if.org Git - postgresql/commitdiff
We neglected to apply domain constraints on UNKNOWN parameters to
authorNeil Conway <neilc@samurai.com>
Thu, 12 Jan 2006 22:28:35 +0000 (22:28 +0000)
committerNeil Conway <neilc@samurai.com>
Thu, 12 Jan 2006 22:28:35 +0000 (22:28 +0000)
prepared statements, per report from David Wheeler.

src/backend/parser/parse_coerce.c

index 8a950a643bd6f1976a84f70c1fa8b29f60b3cf96..c70e6da8579b535e150c894904480b1ae0808198 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/parser/parse_coerce.c,v 2.133 2005/11/22 18:17:16 momjian Exp $
+ *       $PostgreSQL: pgsql/src/backend/parser/parse_coerce.c,v 2.134 2006/01/12 22:28:35 neilc Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -243,7 +243,10 @@ coerce_type(ParseState *pstate, Node *node,
                }
 
                param->paramtype = targetTypeId;
-               return (Node *) param;
+
+               /* Apply domain constraints, if necessary */
+               return coerce_to_domain((Node *) param, InvalidOid, targetTypeId,
+                                                               cformat, false, false);
        }
        if (find_coercion_pathway(targetTypeId, inputTypeId, ccontext,
                                                          &funcId))