pgsql: Fix support of digits in email/hostnames.

Поиск
Список
Период
Сортировка
От Teodor Sigaev
Тема pgsql: Fix support of digits in email/hostnames.
Дата
Msg-id E1akva4-0003Zo-LI@gemulon.postgresql.org
обсуждение исходный текст
Ответы Re: pgsql: Fix support of digits in email/hostnames.  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-committers
Fix support of digits in email/hostnames.

When tsearch was implemented I did several mistakes in hostname/email
definition rules:
1) allow underscore in hostname what prohibited by RFC
2) forget to allow leading digits separated by hyphen (like 123-x.com)
   in hostname
3) do no allow underscore/hyphen after leading digits in localpart of email

Artur's patch resolves two last issues, but by the way allows hosts name like
123_x.com together with 123-x.com. RFC forbids underscore usage in hostname
but pg allows that since initial tsearch version in core, although only
for non-digits. Patch syncs support digits and nondigits in both hostname and
email.

Forbidding underscore in hostname may break existsing usage of tsearch and,
anyhow, it should be done by separate patch.

Author: Artur Zakirov
BUG: #13964

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/61d66c44f18c73094a50a2ef97d26cc03e171dc0

Modified Files
--------------
src/backend/tsearch/wparser_def.c     |  3 +++
src/test/regress/expected/tsearch.out | 22 ++++++++++++++--------
src/test/regress/sql/tsearch.sql      |  6 +++---
3 files changed, 20 insertions(+), 11 deletions(-)


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: pgsql: Rework custom scans to work more like the new extensible node st
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Avoid possibly-unsafe use of Windows' FormatMessage() function.