From: Marco Atzeri <marco.atzeri@gmail.com>
To: pgsql-bugs@postgresql.org
Subject: Re: BUG #8970: ts_parse incorrectly split numbers in digit token
Date: Sun, 26 Jan 2014 09:10:27 +0100
Message-ID: <52E4C2F3.5020705@gmail.com> (raw)
In-Reply-To: <20140126022535.GG10723@eldon.alvh.no-ip.org>
References: <20140125065024.26700.13481@wrigleys.postgresql.org>
<20140126022535.GG10723@eldon.alvh.no-ip.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
On 26/01/2014 03:25, Alvaro Herrera wrote:
> marco.atzeri@gmail.com escribió:
>
>
> To trace this, I would look at src/backend/tsearch/wparser_def.c;
> probably try compiling that file with WPARSER_TRACE defined, and compare
> the output of ts_parse() in something simple such as '345' in a working
> port with the failing one. That might give you clues as to what is
> causing the failure.
>
database created with LANG=en_US.UTF-8
postgres=# SELECT * FROM ts_parse('default', '345');
;
tokid | token
-------+-------
12 | 3
12 | 4
22 | 5
(3 rows)
parsing "345"
state TPS_Base at 3 matched rule 12 flags tostate TPS_InSpace
state TPS_InSpace at 4 matched rule 8 flags BINGO tostate TPS_Base type
blank
state TPS_Base at 4 matched rule 12 flags tostate TPS_InSpace
state TPS_InSpace at 5 matched rule 8 flags BINGO tostate TPS_Base type
blank
state TPS_Base at 5 matched rule 5 flags tostate TPS_InUnsignedInt
state TPS_InUnsignedInt at EOF matched rule 0 flags BINGO tostate
TPS_Base type uint
database created with LANG=C
postgres=# SELECT * FROM ts_parse('default', '345');
;
tokid | token
-------+-------
22 | 345
(1 row)
parsing "345"
state TPS_Base at 3 matched rule 5 flags tostate TPS_InUnsignedInt
state TPS_InUnsignedInt at 4 matched rule 1 flags
state TPS_InUnsignedInt at 5 matched rule 1 flags
state TPS_InUnsignedInt at EOF matched rule 0 flags BINGO tostate
TPS_Base type uint
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: marco.atzeri@gmail.com
Subject: Re: BUG #8970: ts_parse incorrectly split numbers in digit token
In-Reply-To: <52E4C2F3.5020705@gmail.com>
References: <20140125065024.26700.13481@wrigleys.postgresql.org> <20140126022535.GG10723@eldon.alvh.no-ip.org> <52E4C2F3.5020705@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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