Re: Assert failure with ICU support

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: Assert failure with ICU support
Дата
Msg-id
3017542.1681937148@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
Assert failure with ICU support Richard Guo <guofenglinux@gmail.com>
Re: Assert failure with ICU support Tom Lane <tgl@sss.pgh.pa.us>
Re: Assert failure with ICU support Jeff Davis <pgsql@j-davis.com>
Re: Assert failure with ICU support Tom Lane <tgl@sss.pgh.pa.us>
Re: Assert failure with ICU support Jeff Davis <pgsql@j-davis.com>
Re: Assert failure with ICU support Tom Lane <tgl@sss.pgh.pa.us>
Re: Assert failure with ICU support Jeff Davis <pgsql@j-davis.com>
Re: Assert failure with ICU support Tom Lane <tgl@sss.pgh.pa.us>
Jeff Davis  writes:
> We should probably just check that it's plain ASCII.

That was about the same conclusion I came to.  More or less

	c = *v->now++;
-	if (!iscalnum(c))
+	if (!isascii(c) || !iscalnum(c))
		RETV(PLAIN, c);

although I'm not sure if it's a good idea to apply isascii()
to something that's wider than char.  It might be advisable,
if ugly, to write

+	if (c >= 0x100 || !iscalnum(c))

I'm also inclined to remove that "assert(iscalpha(c))" in
the switch.  That's not checking sanity of our own code,
just consistency of the  functions; and as this
episode shows it's more trouble than it's worth.

			regards, tom lane


В списке pgsql-bugs по дате отправления
От: Jeff Davis
Дата:
От: Michael Paquier
Дата:
FAQ