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

Lines changed: 5 additions & 2 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy