We neglected to apply domain constraints on UNKNOWN parameters to

prepared statements, per report from David Wheeler.
This commit is contained in:
Neil Conway 2006-01-12 22:29:11 +00:00
parent a933c4e59e
commit 5dc3d1b0be

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/parser/parse_coerce.c,v 2.132.2.1 2005/11/22 18:23:13 momjian Exp $ * $PostgreSQL: pgsql/src/backend/parser/parse_coerce.c,v 2.132.2.2 2006/01/12 22:29:11 neilc Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -243,7 +243,10 @@ coerce_type(ParseState *pstate, Node *node,
} }
param->paramtype = targetTypeId; 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, if (find_coercion_pathway(targetTypeId, inputTypeId, ccontext,
&funcId)) &funcId))