Re: [BUGS] BUG #5021: ts_parse doesn't recognize email addresses with underscores - Mailing list pgsql-hackers

From Teodor Sigaev
Subject Re: [BUGS] BUG #5021: ts_parse doesn't recognize email addresses with underscores
Date
Msg-id 4B882B29.1070308@sigaev.ru
Whole thread Raw
In response to Re: [BUGS] BUG #5021: ts_parse doesn't recognize email addresses with underscores  (Bruce Momjian <bruce@momjian.us>)
Responses Re: [BUGS] BUG #5021: ts_parse doesn't recognize email addresses with underscores  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
> Oleg, Teodor, can you look at this?  I tried to fix it in wparser_def.c,
> but couldn't figure out how.  Thanks.
>>
>> select distinct token as email
>> from ts_parse('default', ' first_last@yahoo.com '   )
>> where tokid = 4

Patch in attachment, it allows underscore in the middle of local part of email
in in host name (similarly to '-' character).


I'm not sure about backpatching, because it could break existing search
configuration.
--
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
                                                    WWW: http://www.sigaev.ru/

Attachment

pgsql-hackers by date:

Previous
From: Yeb Havinga
Date:
Subject: Re: Avoiding bad prepared-statement plans.
Next
From: Tom Lane
Date:
Subject: Re: Re: Hot Standby query cancellation and Streaming Replication integration