Re: [PGdocs] fix description for handling pf non-ASCII characters

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PGdocs] fix description for handling pf non-ASCII characters
Дата
Msg-id 803569.1695863971@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PGdocs] fix description for handling pf non-ASCII characters  (Peter Smith <smithpb2250@gmail.com>)
Ответы Re: [PGdocs] fix description for handling pf non-ASCII characters  (Peter Smith <smithpb2250@gmail.com>)
RE: [PGdocs] fix description for handling pf non-ASCII characters  ("Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>)
Список pgsql-hackers
Peter Smith <smithpb2250@gmail.com> writes:
> I had in mind something like a SHIFT-JIS encoding where a single
> "character" may include some trail bytes that happen to be in the
> ASCII printable range. AFAIK because the new logic is processing
> bytes, not characters, I thought the end result could be a mix of
> escaped and unescaped bytes for the single SJIS character.

It will not, because ...

> But now looking at PostgreSQL-supported character sets [1] I saw SJIS
> is not supported anyhow. Unfortunately, I am not familiar enough with
> other encodings to know if there is still a chance of similar
> printable ASCII trail bytes so I am fine with whatever wording is
> chosen.

... trailing bytes that could be mistaken for ASCII are precisely
the property that causes us to reject an encoding as not backend-safe.
So this code doesn't need to consider that hazard, and processing the
string byte-by-byte is perfectly OK.

I'd be inclined to keep the text as simple as possible and not focus on
the distinction between bytes and characters.

            regards, tom lane



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

Предыдущее
От: Peter Smith
Дата:
Сообщение: Re: [PGdocs] fix description for handling pf non-ASCII characters
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: Eager page freeze criteria clarification