| От | Tom Lane |
|---|---|
| Тема | Re: Multibyte char encoding atttypmod weirdness |
| Дата | |
| Msg-id | 3326.1046099239@sss.pgh.pa.us обсуждение |
| Ответ на | Multibyte char encoding atttypmod weirdness ("Huaxin WANG" <wanghx@netspeed-tech.com>) |
| Список | pgsql-bugs |
"Huaxin WANG" <wanghx@netspeed-tech.com> writes:
> When locale is set to multibyte char encoding languages,
> such as ja_JP.eucjp, and char encoding set to EUC_JP, for the char(20)
> columns (attributes), the libpq ((PGresult *)res)->attDescs[0].atttypmod
> returned by PQfmod(res, 0) is not correct. It's neither 20, nor 20+4 as
> reported in the hackers' mail list [1], but something varying (which I
> failed
> to figure out). In my specific case, it's 25.
I don't think so. A column declared as char(N) *will* have an atttypmod
of N+4. The actual physical length in bytes of a column entry might
be more, though, since we measure N in terms of characters not bytes.
regards, tom lane
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера