Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-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

pgsql-docs by date

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

pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group