pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #13964: unexpected result from to_tsvector
4+ messages / 4 participants
[nested] [flat]
* BUG #13964: unexpected result from to_tsvector
@ 2016-02-17 08:00 ruxandra.durus@vauban.ro
2016-02-18 10:53 ` Re: BUG #13964: unexpected result from to_tsvector Artur Zakirov <a.zakirov@postgrespro.ru>
0 siblings, 1 reply; 4+ messages in thread
From: ruxandra.durus@vauban.ro @ 2016-02-17 08:00 UTC (permalink / raw)
To: pgsql-bugs
The following bug has been logged on the website:
Bug reference: 13964
Logged by: Ruxandra
Email address: ruxandra.durus@vauban.ro
PostgreSQL version: 9.5.1
Operating system: Cent OS 6.7
Description:
Hello,
My version of PostgreSQL is:
"PostgreSQL 9.5beta1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.4.7
20120313 (Red Hat 4.4.7-16), 64-bit"
More details about the operating system:
Linux javatesting 2.6.32-573.7.1.el6.x86_64 #1 SMP Tue Sep 22 22:00:00 UTC
2015 x86_64 x86_64 x86_64 GNU/Linux
I am using pgAdmin version 1.20.0 to query the database.
I am using your full text search (which works great), but i have a small
problem:
SELECT to_tsvector('simple', 'test@vauban-reg.ro');
returns "'test@vauban-reg.ro':1"
which is exactly what I need.
But when I run :
SELECT to_tsvector('simple', 'test@123-reg.ro');
I get:
"'123':2 'reg.ro':3 'test':1"
instead of "'test@123-reg.ro':1"
From the documentation here
http://www.postgresql.org/docs/current/static/pgtrgm.html , point F.30.4. I
understood that with "simple" option only space is a separator for the
stems. Is it a bug or am I doing something wrong?
Thank you for your time,
Ruxandra Durus
--
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] 4+ messages in thread
* Re: BUG #13964: unexpected result from to_tsvector
2016-02-17 08:00 BUG #13964: unexpected result from to_tsvector ruxandra.durus@vauban.ro
@ 2016-02-18 10:53 ` Artur Zakirov <a.zakirov@postgrespro.ru>
2016-02-18 12:33 ` Re: BUG #13964: unexpected result from to_tsvector Ruxandra Durus <Ruxandra.Durus@vauban.ro>
2016-02-18 20:47 ` Re: BUG #13964: unexpected result from to_tsvector Jim Nasby <Jim.Nasby@BlueTreble.com>
0 siblings, 2 replies; 4+ messages in thread
From: Artur Zakirov @ 2016-02-18 10:53 UTC (permalink / raw)
To: ruxandra.durus@vauban.ro; pgsql-bugs
On 17.02.2016 11:00, ruxandra.durus@vauban.ro wrote:
>
> My version of PostgreSQL is:
> "PostgreSQL 9.5beta1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.4.7
> 20120313 (Red Hat 4.4.7-16), 64-bit"
>
> More details about the operating system:
> Linux javatesting 2.6.32-573.7.1.el6.x86_64 #1 SMP Tue Sep 22 22:00:00 UTC
> 2015 x86_64 x86_64 x86_64 GNU/Linux
>
> I am using pgAdmin version 1.20.0 to query the database.
>
> I am using your full text search (which works great), but i have a small
> problem:
> SELECT to_tsvector('simple', 'test@vauban-reg.ro');
>
> returns "'test@vauban-reg.ro':1"
>
> which is exactly what I need.
>
>
> But when I run :
>
> SELECT to_tsvector('simple', 'test@123-reg.ro');
>
> I get:
> "'123':2 'reg.ro':3 'test':1"
>
> instead of "'test@123-reg.ro':1"
>
>>From the documentation here
> http://www.postgresql.org/docs/current/static/pgtrgm.html , point F.30.4. I
> understood that with "simple" option only space is a separator for the
> stems. Is it a bug or am I doing something wrong?
>
> Thank you for your time,
> Ruxandra Durus
>
Hi,
It seems that this is a text search parser issue. More informative queries:
=> SELECT * FROM ts_debug('simple', 'test@vauban-reg.ro');
alias | description | token | dictionaries | dictionary
| lexemes
-------+---------------+--------------------+--------------+------------+----------------------
email | Email address | test@vauban-reg.ro | {simple} | simple
| {test@vauban-reg.ro}
(1 row)
=> SELECT * FROM ts_debug('simple', 'test@123-reg.ro');
alias | description | token | dictionaries | dictionary |
lexemes
-----------+------------------+--------+--------------+------------+----------
asciiword | Word, all ASCII | test | {simple} | simple | {test}
blank | Space symbols | @ | {} | |
uint | Unsigned integer | 123 | {simple} | simple | {123}
blank | Space symbols | - | {} | |
host | Host | reg.ro | {simple} | simple |
{reg.ro}
(5 rows)
Attached patch can fix it. Is this a bug? Should I create a record in
the commitfest?
This patch also allows to parser work with emails '123@123-reg.ro' and
'test@123_reg.ro' correctly.
--
Artur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Attachments:
number_in_email.patch (text/x-patch, 682B) download
*** a/src/backend/tsearch/wparser_def.c
--- b/src/backend/tsearch/wparser_def.c
***************
*** 1121,1126 **** static const TParserStateActionItem actionTPS_InUnsignedInt[] = {
--- 1121,1129 ----
{p_iseqC, '.', A_PUSH, TPS_InUDecimalFirst, 0, NULL},
{p_iseqC, 'e', A_PUSH, TPS_InMantissaFirst, 0, NULL},
{p_iseqC, 'E', A_PUSH, TPS_InMantissaFirst, 0, NULL},
+ {p_iseqC, '-', A_PUSH, TPS_InHostFirstAN, 0, NULL},
+ {p_iseqC, '_', A_PUSH, TPS_InHostFirstAN, 0, NULL},
+ {p_iseqC, '@', A_PUSH, TPS_InEmail, 0, NULL},
{p_isasclet, 0, A_PUSH, TPS_InHost, 0, NULL},
{p_isalpha, 0, A_NEXT, TPS_InNumWord, 0, NULL},
{p_isspecial, 0, A_NEXT, TPS_InNumWord, 0, NULL},
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: BUG #13964: unexpected result from to_tsvector
2016-02-17 08:00 BUG #13964: unexpected result from to_tsvector ruxandra.durus@vauban.ro
2016-02-18 10:53 ` Re: BUG #13964: unexpected result from to_tsvector Artur Zakirov <a.zakirov@postgrespro.ru>
@ 2016-02-18 12:33 ` Ruxandra Durus <Ruxandra.Durus@vauban.ro>
1 sibling, 0 replies; 4+ messages in thread
From: Ruxandra Durus @ 2016-02-18 12:33 UTC (permalink / raw)
To: Artur Zakirov <a.zakirov@postgrespro.ru>; +Cc: pgsql-bugs
Hello,
Thank you for your fast response, but I cannot install patches, and I don't know how. I hope this fix will be included in a version of PostgreSQL in the future.
Thank you for your time,
Ruxandra Durus
-----Original Message-----
From: Artur Zakirov [mailto:a.zakirov@postgrespro.ru]
Sent: Thursday, February 18, 2016 12:54 PM
To: Ruxandra Durus; pgsql-bugs@postgresql.org
Subject: Re: [BUGS] BUG #13964: unexpected result from to_tsvector
On 17.02.2016 11:00, ruxandra.durus@vauban.ro wrote:
>
> My version of PostgreSQL is:
> "PostgreSQL 9.5beta1 on x86_64-pc-linux-gnu, compiled by gcc (GCC)
> 4.4.7
> 20120313 (Red Hat 4.4.7-16), 64-bit"
>
> More details about the operating system:
> Linux javatesting 2.6.32-573.7.1.el6.x86_64 #1 SMP Tue Sep 22 22:00:00
> UTC
> 2015 x86_64 x86_64 x86_64 GNU/Linux
>
> I am using pgAdmin version 1.20.0 to query the database.
>
> I am using your full text search (which works great), but i have a
> small
> problem:
> SELECT to_tsvector('simple', 'test@vauban-reg.ro');
>
> returns "'test@vauban-reg.ro':1"
>
> which is exactly what I need.
>
>
> But when I run :
>
> SELECT to_tsvector('simple', 'test@123-reg.ro');
>
> I get:
> "'123':2 'reg.ro':3 'test':1"
>
> instead of "'test@123-reg.ro':1"
>
>>From the documentation here
> http://www.postgresql.org/docs/current/static/pgtrgm.html , point
> F.30.4. I understood that with "simple" option only space is a
> separator for the stems. Is it a bug or am I doing something wrong?
>
> Thank you for your time,
> Ruxandra Durus
>
Hi,
It seems that this is a text search parser issue. More informative queries:
=> SELECT * FROM ts_debug('simple', 'test@vauban-reg.ro');
alias | description | token | dictionaries | dictionary
| lexemes
-------+---------------+--------------------+--------------+------------+----------------------
email | Email address | test@vauban-reg.ro | {simple} | simple
| {test@vauban-reg.ro}
(1 row)
=> SELECT * FROM ts_debug('simple', 'test@123-reg.ro');
alias | description | token | dictionaries | dictionary |
lexemes
-----------+------------------+--------+--------------+------------+----
-----------+------------------+--------+--------------+------------+----
-----------+------------------+--------+--------------+------------+--
asciiword | Word, all ASCII | test | {simple} | simple | {test}
blank | Space symbols | @ | {} | |
uint | Unsigned integer | 123 | {simple} | simple | {123}
blank | Space symbols | - | {} | |
host | Host | reg.ro | {simple} | simple |
{reg.ro}
(5 rows)
Attached patch can fix it. Is this a bug? Should I create a record in the commitfest?
This patch also allows to parser work with emails '123@123-reg.ro' and 'test@123_reg.ro' correctly.
--
Artur Zakirov
Postgres Professional: http://www.postgrespro.com Russian Postgres Company
--
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] 4+ messages in thread
* Re: BUG #13964: unexpected result from to_tsvector
2016-02-17 08:00 BUG #13964: unexpected result from to_tsvector ruxandra.durus@vauban.ro
2016-02-18 10:53 ` Re: BUG #13964: unexpected result from to_tsvector Artur Zakirov <a.zakirov@postgrespro.ru>
@ 2016-02-18 20:47 ` Jim Nasby <Jim.Nasby@BlueTreble.com>
1 sibling, 0 replies; 4+ messages in thread
From: Jim Nasby @ 2016-02-18 20:47 UTC (permalink / raw)
To: Artur Zakirov <a.zakirov@postgrespro.ru>; ruxandra.durus@vauban.ro; pgsql-bugs
On 2/18/16 4:53 AM, Artur Zakirov wrote:
> Attached patch can fix it. Is this a bug? Should I create a record in
> the commitfest?
Unless someone commits it in the next day or so, I would absolutely put
it in the commitfest.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
--
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] 4+ messages in thread
end of thread, other threads:[~2016-02-18 20:47 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-02-17 08:00 BUG #13964: unexpected result from to_tsvector ruxandra.durus@vauban.ro
2016-02-18 10:53 ` Artur Zakirov <a.zakirov@postgrespro.ru>
2016-02-18 12:33 ` Ruxandra Durus <Ruxandra.Durus@vauban.ro>
2016-02-18 20:47 ` Jim Nasby <Jim.Nasby@BlueTreble.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