Re: BUG #3767: tsearch2 index creation fatal crash

From: "Thomas H(dot)" <me(at)alternize(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #3767: tsearch2 index creation fatal crash
Date: 2007-11-21 04:42:36
Message-ID: 4743B73C.4080606@alternize.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-docs

>> there are more problems with tsvectors. this also fails:
>
>> SELECT ' just a test: 123 '::tsvector;
>> ERROR: syntax error in tsvector: " just a test: 123 "
>
> That's not a bug; your input isn't valid tsvector syntax.
>

ok. after re-reading page

http://www.postgresql.org/docs/8.3/static/textsearch-intro.html#TEXTSEARCH-SEARCHES

i saw my mistake. i misinterpreted the examples to show the possibility
to convert *any* text by using casting to tsvector as an alternative to
using to_tsvector :)

to new tsearch-users, it might not be obvious clear that you can't just
cast any text but should use to_tsvector. the example string 'a fat cat
sat on a mat and ate a fat rat' looks like an normal "random" text
string, especially when a tsvector in psql looks like

'ate':9 'cat':3 'fat':2,11 'mat':7 'rat':12 'sat':4

and doesn't contain stopwords like "a" and "and", which are included in
the casted string...

maybe an additional example that shows the usage of to_tsvector for any
input string would help...

thanks, thomas

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2007-11-21 04:53:12 Re: BUG #3767: tsearch2 index creation fatal crash
Previous Message Tom Lane 2007-11-21 03:45:25 Re: BUG #3767: tsearch2 index creation fatal crash

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2007-11-21 04:53:12 Re: BUG #3767: tsearch2 index creation fatal crash
Previous Message Tom Lane 2007-11-21 03:45:25 Re: BUG #3767: tsearch2 index creation fatal crash