Teodor Sigaev wrote: > > 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_l...@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).
Thanks, patch applied. > I'm not sure about backpatching, because it could break existing search > configuration. Agreed. I don't think this warrants backpatching. Here is the before behavior: test=> select ts_parse('default', ' first_l...@yahoo.com ' ); ts_parse -------------------- (12," ") (1,first) (12,_) --> (4,l...@yahoo.com) (12," ") (5 rows) and the after-patch, fixed behavior: test=> select ts_parse('default', ' first_l...@yahoo.com ' ); ts_parse -------------------------- (12," ") --> (4,first_l...@yahoo.com) (12," ") (3 rows) I assume because this only expands the pattern space for email addresses that there is no affect on binary upgrades with this patch. Is that correct? Would an email address check on a binary-upgraded tsvector index not match an email address with underscores? Do we need a warning in the release notes about this? -- Bruce Momjian <br...@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com PG East: http://www.enterprisedb.com/community/nav-pg-east-2010.do -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers