Re: Strange behavior on to_tsquery() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Strange behavior on to_tsquery()
Date
Msg-id 17700.1320358902@sss.pgh.pa.us
Whole thread Raw
In response to Strange behavior on to_tsquery()  (Rodrigo Hjort <rodrigo.hjort@gmail.com>)
Responses Re: Strange behavior on to_tsquery()
List pgsql-hackers
Rodrigo Hjort <rodrigo.hjort@gmail.com> writes:
> I created a *custom dictionary* (based on dict_int) and a search
> configuration and a strange behavior happens on *PostgreSQL 8.4.9*.
> ...
> Therefore, when I use *@@ operator* over a *tsvector* column in my table
> the result set is not always the same.

This almost certainly means a bug in your dictionary code.

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

Prefix search request.  Possibly you're forgetting to zero out the
prefix flag?

(Just offhand, it rather looks like dict_int and dict_xsyn are both
assuming that palloc will give back zeroed space, which is bogus...)
        regards, tom lane


pgsql-hackers by date:

Previous
From: Rodrigo Hjort
Date:
Subject: Strange behavior on to_tsquery()
Next
From: Alvaro Herrera
Date:
Subject: isolationtester patch