Alvaro Herrera wrote: > > Upon seeing this patch I considered that I use addresses such as > alvherre+st...@something.org and wondered how could this thing support > that. I don't think we want extra parser stuff just to add whatever > random junk we want to support in email addresses ...
Well, I think the big question is whether we need to honor RFC 5322 (http://www.rfc-editor.org/rfc/rfc5322.txt). Wikipedia says these are all valid characters: http://en.wikipedia.org/wiki/E-mail_address * Uppercase and lowercase English letters (a-z, A-Z) * Digits 0 to 9 * Characters ! # $ % & ' * + - / = ? ^ _ ` { | } ~ * Character . (dot, period, full stop) provided that it is not the first or last character, and provided also that it does not appear two or more times consecutively. And we don't currently honor most of the special characters, including plus: test=> select ts_parse('default', ' first+l...@yahoo.com ' ); ts_parse -------------------- (12," ") (1,first) (12,+) (4,l...@yahoo.com) (12," ") (5 rows) Where does this leave us? Do we add the other characters? Do we document that we only allow a limited number of characters for email addresses? What is the logic in that? Do any of these characters conflict with our tsquery operators? -- 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