Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 4b3252c

Browse files
author
Neil Conway
committed
We neglected to apply domain constraints on UNKNOWN parameters to
prepared statements, per report from David Wheeler.
1 parent ea73a78 commit 4b3252c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/backend/parser/parse_coerce.c

+5-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/parser/parse_coerce.c,v 2.133 2005/11/22 18:17:16 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/parser/parse_coerce.c,v 2.134 2006/01/12 22:28:35 neilc Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -243,7 +243,10 @@ coerce_type(ParseState *pstate, Node *node,
243243
}
244244

245245
param->paramtype = targetTypeId;
246-
return (Node *) param;
246+
247+
/* Apply domain constraints, if necessary */
248+
return coerce_to_domain((Node *) param, InvalidOid, targetTypeId,
249+
cformat, false, false);
247250
}
248251
if (find_coercion_pathway(targetTypeId, inputTypeId, ccontext,
249252
&funcId))

0 commit comments

Comments
 (0)