Re: length coerce for bpchar is broken since 7.0 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: length coerce for bpchar is broken since 7.0
Date
Msg-id 28841.972492548@sss.pgh.pa.us
Whole thread Raw
In response to Re: length coerce for bpchar is broken since 7.0  (Tatsuo Ishii <t-ishii@sra.co.jp>)
List pgsql-hackers
Tatsuo Ishii <t-ishii@sra.co.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


pgsql-hackers by date:

Previous
From: Lamar Owen
Date:
Subject: Re: [Fwd: [CORE SDI ADVISORY] MySQL weak authentication]
Next
From: Bruce Momjian
Date:
Subject: Re: --with-perl=/path/to/prefered/perl?