Re: length coerce for bpchar is broken since 7.0

Поиск
Список
Период
Сортировка
От Tatsuo Ishii
Тема Re: length coerce for bpchar is broken since 7.0
Дата
Msg-id 20001017223348M.t-ishii@sra.co.jp
обсуждение исходный текст
Ответ на Re: length coerce for bpchar is broken since 7.0  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: length coerce for bpchar is broken since 7.0  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> It's just hardwired knowledge about that particular datatype.  In the
> light of your comments, it seems clear that the code here is wrong
> for the MULTIBYTE case: instead of plain VARSIZE(), it should be
> returning the number of multibyte characters + 4 (or whatever
> atttypmod is defined to mean for MULTIBYTE bpchar).  I think I wrote
> this code to start with, so you can blame me for the fact that it
> neglects the MULTIBYTE case :-(

I'm going to fix the problem by changing bpcharin() rather than
changing exprTypmod(). Surely we could fix the problem by changing
exprTypmod() for INSERT, however, we could not fix the similar problem
for COPY FROM in the same way.  Changing bpcharin() would solve
problems of both INSERT and COPY FROM. So bpcharin() seems more
appropreate place to fix both problems.
--
Tatsuo Ishii


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Devik
Дата:
Сообщение: Re: pgsql is 75 times faster with my new index scan
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: incompatible changes of PQsetdbLogin()