1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-18 12:22:09 +03:00

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:22 +00:00
parent e26b09618b
commit b0b8bab575

View File

@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/parser/parse_coerce.c,v 2.126 2004/12/31 22:00:27 pgsql Exp $ * $PostgreSQL: pgsql/src/backend/parser/parse_coerce.c,v 2.126.4.1 2006/01/12 22:29:22 neilc Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@@ -242,7 +242,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))