| От | Tom Lane |
|---|---|
| Тема | Re: length coerce for bpchar is broken since 7.0 |
| Дата | |
| Msg-id | 29430.971757806@sss.pgh.pa.us обсуждение |
| Ответ на | Re: length coerce for bpchar is broken since 7.0 (Tatsuo Ishii <t-ishii@sra.co.jp>) |
| Ответы |
Re: length coerce for bpchar is broken since 7.0
|
| Список | pgsql-hackers |
Tatsuo Ishii <t-ishii@sra.co.jp> writes:
> Before going further, may I ask you a question. Why in exprTypmod() is
> bpchar() treated differently from other data types such as varchar?
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 :-(
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера