Re: pgsql: Fix support of digits in email/hostnames. - Mailing list pgsql-committers

From Bruce Momjian
Subject Re: pgsql: Fix support of digits in email/hostnames.
Date
Msg-id 20160428234154.GC11728@momjian.us
Whole thread Raw
In response to pgsql: Fix support of digits in email/hostnames.  (Teodor Sigaev <teodor@sigaev.ru>)
Responses Re: pgsql: Fix support of digits in email/hostnames.  (Teodor Sigaev <teodor@sigaev.ru>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Adjust DatumGetBool macro, this time for sure.
Next
From: Andres Freund
Date:
Subject: pgsql: Remember asking for feedback during walsender shutdown.