pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedEmail parsing in Text Search
3+ messages / 2 participants
[nested] [flat]
* Email parsing in Text Search
@ 2016-09-07 17:51 Martin Dubé <martin.dube@gmail.com>
2016-09-07 18:32 ` Re: Email parsing in Text Search Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 3+ messages in thread
From: Martin Dubé @ 2016-09-07 17:51 UTC (permalink / raw)
To: pgsql-bugs
Hi,
I'm having a weird behavior with the email parser and wonder if it is a bug
or a feature.
When using the default regconfig and parse an email where the first part is
numbers only, it is not parsed as an email.
db=# select * from ts_debug('pg_catalog.english', '000000001@asdf.com');
alias | description | token | dictionaries | dictionary |
lexemes
-------+------------------+-----------+--------------+------------+-------------
uint | Unsigned integer | 000000001 | {simple} | simple |
{000000001}
blank | Space symbols | @ | {} | |
host | Host | asdf.com | {simple} | simple | {
asdf.com}
(3 rows)
However, if I add a letter, it is parsed as an email.
db=# select * from ts_debug('pg_catalog.english', '000000001a@asdf.com');
alias | description | token | dictionaries | dictionary |
lexemes
-------+---------------+---------------------+--------------+------------+-----------------------
email | Email address | 000000001a@asdf.com | {simple} | simple | {
000000001a@asdf.com}
(1 row)
According to RFC and several forums, an email address with only numbers in
the first part is valid.
Is it a normal behavior?
I did the test on OpenBSD 5.9 and postgresql is at version 9.4.6.
Thanks,
--
Mart
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Email parsing in Text Search
2016-09-07 17:51 Email parsing in Text Search Martin Dubé <martin.dube@gmail.com>
@ 2016-09-07 18:32 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-09-07 18:34 ` Re: Email parsing in Text Search Martin Dubé <martin.dube@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Tom Lane @ 2016-09-07 18:32 UTC (permalink / raw)
To: Martin Dubé <martin.dube@gmail.com>; +Cc: pgsql-bugs
=?UTF-8?B?TWFydGluIER1YsOp?= <martin.dube@gmail.com> writes:
> When using the default regconfig and parse an email where the first part is
> numbers only, it is not parsed as an email.
This has been changed for 9.6:
* Fix the default text search parser to allow leading digits in email and host tokens (Artur Zakirov)
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Email parsing in Text Search
2016-09-07 17:51 Email parsing in Text Search Martin Dubé <martin.dube@gmail.com>
2016-09-07 18:32 ` Re: Email parsing in Text Search Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-09-07 18:34 ` Martin Dubé <martin.dube@gmail.com>
0 siblings, 0 replies; 3+ messages in thread
From: Martin Dubé @ 2016-09-07 18:34 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs
I should have seen that! Thank you very much!
On Wed, Sep 7, 2016 at 2:32 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> =?UTF-8?B?TWFydGluIER1YsOp?= <martin.dube@gmail.com> writes:
> > When using the default regconfig and parse an email where the first part
> is
> > numbers only, it is not parsed as an email.
>
> This has been changed for 9.6:
>
> * Fix the default text search parser to allow leading digits in
> email and host tokens (Artur Zakirov)
>
> regards, tom lane
>
--
Mart
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2016-09-07 18:34 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-09-07 17:51 Email parsing in Text Search Martin Dubé <martin.dube@gmail.com>
2016-09-07 18:32 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-09-07 18:34 ` Martin Dubé <martin.dube@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox