Re: length coerce for bpchar is broken since 7.0

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: length coerce for bpchar is broken since 7.0
Date: 2000-10-25 16:49:08
Message-ID: 28841.972492548@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Larry Rosenman 2000-10-25 16:50:16 Re: --with-perl=/path/to/prefered/perl?
Previous Message Tom Lane 2000-10-25 16:28:35 Re: A rare error