When the parser sees the "@", it goes into "email state". In email state, it recurses, trying to find out if the string after the "@" is a valid hostname. That in turn goes into email state, recurses again and so forth, until you reach the end of the string. Then, the recursion unwinds back to the first @, moving on to the next character. At the next "@" the cycle repeats.
True

Since the recursion only wants to know if the string after "@" is a valid hostname, we can stop the recursion as soon as we find out that it's not. The attached patch does that.
Committed to HEAD, 8.3 and 8.2, thank you. Previous releases are not affected.


--
Teodor Sigaev                                   E-mail: teo...@sigaev.ru
                                                   WWW: http://www.sigaev.ru/

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to