It seems that the planner is being smart to check the ConstantValueExpression for varchar size in function "refineValueType()".