Re: [PATCH] Expand character set for ltree labels

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCH] Expand character set for ltree labels
Дата
Msg-id 2438294.1664996341@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [PATCH] Expand character set for ltree labels  (Garen Torikian <gjtorikian@gmail.com>)
Ответы Re: [PATCH] Expand character set for ltree labels  (Garen Torikian <gjtorikian@gmail.com>)
Список pgsql-hackers
Garen Torikian <gjtorikian@gmail.com> writes:
> I am submitting a patch to expand the label requirements for ltree.

> The current format is restricted to alphanumeric characters, plus _.
> Unfortunately, for non-English labels, this set is insufficient.

Hm?  Perhaps the docs are a bit unclear about that, but it's not
restricted to ASCII alphanumerics.  AFAICS the code will accept
whatever iswalpha() and iswdigit() will accept in the database's
default locale.  There's certainly work that could/should be done
to allow use of not-so-default locales, but that's not specific
to ltree.  I'm not sure that doing an application-side encoding
is attractive compared to just using that ability directly.

If you do want to do application-side encoding, I'm unsure why
punycode would be the choice anyway, as opposed to something
that can fit in the existing restrictions.

> On top of this, I added support for two more characters: # and ;, which are
> used for HTML entities.

That seems really pretty random.

            regards, tom lane



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

Предыдущее
От: Nathan Bossart
Дата:
Сообщение: Re: archive modules
Следующее
От: Nathan Bossart
Дата:
Сообщение: Re: Startup process on a hot standby crashes with an error "invalid memory alloc request size 1073741824" while replaying "Standby/LOCK" records