| От | Tom Lane |
|---|---|
| Тема | Re: invalidly encoded strings |
| Дата | |
| Msg-id | 18395.1189541574@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: invalidly encoded strings (Tatsuo Ishii <ishii@postgresql.org>) |
| Список | pgsql-hackers |
Tatsuo Ishii <ishii@postgresql.org> writes:
>> If we make convert() operate on bytea and return bytea, as Tom
>> suggested, would that solve your use case?
> The problem is, the above use case is just one of what I can think of.
> Another use case is, something like this:
> SELECT sum(octet_length(convert(text_column using utf8_to_euc_jp))) FROM mytable;
> to know the total byte length of text column if it's encoded in
> EUC_JP.
Since octet_length exists and produces identical results for both text
and bytea, this example is hardly very convincing...
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера