Re: Optimizing COPY

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Optimizing COPY
Дата
Msg-id 491B0297.5080903@enterprisedb.com
обсуждение исходный текст
Ответ на Re: Optimizing COPY  (Chuck McDevitt <cmcdevitt@greenplum.com>)
Список pgsql-hackers
Chuck McDevitt wrote:
> What if the block of text is split in the middle of a multibyte character?
> I don't think it is safe to assume raw blocks always end on a character boundary.

Yeah, it's not. I realized myself after submitting. The generic approach 
is to loop with pg_mblen() to find out the max. safe length. For UTF-8, 
and probably many other multi-byte encodings as well, we can detect 
whether a byte is the first byte of a multi-byte character, just by 
looking at the few high-bits of the byte.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: libpq-events windows gotcha
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: [GENERAL] Very slow queries w/ NOT IN preparation (seems like a bug, test case)