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

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Teodor Sigaev <teodor(at)sigaev(dot)ru>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Fix support of digits in email/hostnames.
Date: 2016-04-28 23:41:54
Message-ID: 20160428234154.GC11728@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)momjian(dot)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 +

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2016-04-29 05:11:38 pgsql: Remember asking for feedback during walsender shutdown.
Previous Message Tom Lane 2016-04-28 15:51:40 pgsql: Adjust DatumGetBool macro, this time for sure.