Re: invalidly encoded strings

Поиск
Список
Период
Сортировка
От 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pg_dump and money type
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: What is happening on buildfarm member dugong