tsearch prefix searching doesn't work when last char of prefix is accent char

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Cc: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
Subject: tsearch prefix searching doesn't work when last char of prefix is accent char
Date: 2011-11-04 09:42:31
Message-ID: CAFj8pRCRYscrB4xMivyg3u9nzzyZmJj1yh1Hdqigfj9d+=tv3w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hello

I found a following bug

create table n(a varchar);
postgres=# insert into n values('Stěhule'),('Chromečka');

postgres=# select * from n;
a
───────────
Stěhule
Chromečka
(2 rows)

-- work
postgres=# select * from n where to_tsvector('cs', a) @@
to_tsquery('cs','St:*') ;
a
─────────
Stěhule
(1 row)

-- doesn't work
postgres=# select * from n where to_tsvector('cs', a) @@
to_tsquery('cs','Stě:*') ;
a
───
(0 rows)

-- work again
postgres=# select * from n where to_tsvector('cs', a) @@
to_tsquery('cs','Stěh:*') ;
a
─────────
Stěhule
(1 row)

postgres=# select version();
version
──────────────────────────────────────────────────────────────────────────────────────────────────────────
PostgreSQL 9.2devel on i686-pc-linux-gnu, compiled by gcc (GCC) 4.5.1
20100924 (Red Hat 4.5.1-4), 32-bit
(1 row)

postgres=# show server_encoding;
server_encoding
─────────────────
UTF8
(1 row)

postgres=# show lc_collate ;
lc_collate
─────────────
cs_CZ.utf-8
(1 row)

Regards

Pavel Stehule

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Dave Cramer 2011-11-04 10:31:20 Re: Fwd: [BUGS] BUG #6285: PreparedStatement#executeUpdate gets syntax error on apostrophe
Previous Message Johann 'Myrkraverk' Oskarsson 2011-11-03 23:37:37 Re: Fwd: [BUGS] BUG #6285: PreparedStatement#executeUpdate gets syntax error on apostrophe