Strange behavior on to_tsquery()

From: Rodrigo Hjort <rodrigo(dot)hjort(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Strange behavior on to_tsquery()
Date: 2011-11-03 21:11:35
Message-ID: CAAjEfRz+TCTWX=cG6gPx+sDpsa9QN16s9X6+4F1RkyR6vUBWsg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello PG hackers,

I created a *custom dictionary* (based on dict_int) and a search
configuration and a strange behavior happens on *PostgreSQL 8.4.9*.

When I invoke the following instruction several times,*
to_tsquery()*returns distinct results:

catalog=> SELECT to_tsquery('custom', 'pi');
to_tsquery
------------
'pi':*
(1 registro)

catalog=> SELECT to_tsquery('custom', 'pi');
to_tsquery
------------
'pi'
(1 registro)

Therefore, when I use *@@ operator* over a *tsvector* column in my table
the result set is not always the same.

1) Do you have any clue on what could be happening and how to solve this
issue, please?

2) Sometimes the value returned by *to_tsquery()* has a ":*" suffix. What
does that mean?

Thanks in advance.

Best Regards,

--
Rodrigo Hjort
www.hjort.co

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-11-03 21:28:34 Re: Strange problem with create table as select * from table;
Previous Message Andrew Dunstan 2011-11-03 20:44:50 Re: ts_count