============================================================
*** src/backend/parser/parse_coerce.c	8b4850b0ee25092c7c6166233049c4b48f05d443
--- src/backend/parser/parse_coerce.c	35431971d0f97977d363dcd4c46bab18526d5269
***************
*** 209,214 ****
--- 209,216 ----
  		 */
  		Param	   *param = (Param *) node;
  		int			paramno = param->paramid;
+ 		Type		targetType;
+ 		char		targetTyptype;
  		ParseState *toppstate;
  
  		toppstate = pstate;
***************
*** 243,249 ****
  		}
  
  		param->paramtype = targetTypeId;
! 		return (Node *) param;
  	}
  	if (find_coercion_pathway(targetTypeId, inputTypeId, ccontext,
  							  &funcId))
--- 245,263 ----
  		}
  
  		param->paramtype = targetTypeId;
! 		result = (Node *) param;
! 
! 		targetType = typeidType(targetTypeId);
! 		targetTyptype = typeTypType(targetType);
! 
! 		/* If target is a domain, apply constraints */
! 		if (targetTyptype == 'd')
! 			result = coerce_to_domain(result, InvalidOid, targetTypeId,
! 									  cformat, false, false);
! 
! 		ReleaseSysCache(targetType);
! 
! 		return result;
  	}
  	if (find_coercion_pathway(targetTypeId, inputTypeId, ccontext,
  							  &funcId))
