Re: pgsql: Fix support of digits in email/hostnames.

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: pgsql: Fix support of digits in email/hostnames.
Дата
Msg-id 20160428234154.GC11728@momjian.us
обсуждение исходный текст
Ответ на pgsql: Fix support of digits in email/hostnames.  (Teodor Sigaev <teodor@sigaev.ru>)
Ответы Re: pgsql: Fix support of digits in email/hostnames.  (Teodor Sigaev <teodor@sigaev.ru>)
Список pgsql-committers
On Tue, Mar 29, 2016 at 03:29:20PM +0000, Teodor Sigaev wrote:
> 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

Doesn't this invalidate tsvector indexes upgraded by pg_upgrade?  Should
they be marked as invalid?

Can you also fix the other two TODO items related to this?

    Improve handling of dash and plus signs in email address
    user names, and perhaps improve URL parsing

    http://www.postgresql.org/message-id/201010122203.o9CM3RW09263@momjian.us

    http://www.postgresql.org/message-id/E1Ri8il-0008Ct-9p@wrigleys.postgresql.org

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

+ As you are, so once was I. As I am, so you will be. +
+                     Ancient Roman grave inscription +


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Adjust DatumGetBool macro, this time for sure.
Следующее
От: Andres Freund
Дата:
Сообщение: pgsql: Remember asking for feedback during walsender shutdown.