Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp> writes:
>>>> Can you give me any example for this case?
>>
>> UPDATE foo SET bpcharcol = 'a'::char || 'b'::char;
>>
>> UPDATE foo SET bpcharcol = upper('abc');
> In those cases above bpchar() will be called anyway, so I don't see
> MULTIBYTE length coerce problems there.
So it will, but *only* because the parser realizes that it needs to
add a call to bpchar(). If exprTypmod returns incorrect values then
it's possible that the parser would wrongly decide it didn't need to
call bpchar().
regards, tom lane