• Teodor Sigaev's avatar
    Fix support of digits in email/hostnames. · 61d66c44
    Teodor Sigaev authored
    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
    61d66c44
tsearch.out 35.7 KB