pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas H. <me@alternize.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #3767: tsearch2 index creation fatal crash
Date: Wed, 21 Nov 2007 05:42:36 +0100
Message-ID: <4743B73C.4080606@alternize.com> (raw)
In-Reply-To: <22471.1195616725@sss.pgh.pa.us>
References: <200711210225.lAL2PE8a064911@wwwmaster.postgresql.org>
	<47439A13.3000404@alternize.com>
	<21708.1195613326@sss.pgh.pa.us>
	<47439DDF.5010600@alternize.com>
	<22471.1195616725@sss.pgh.pa.us>

>> 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





view thread (10+ messages)  latest in thread

Message-ID: <4743B73C.4080606@alternize.com>
Permalink:  ../4743B73C.4080606@alternize.com/
Also on:    postgresql.org/message-id/4743B73C.4080606@alternize.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: me@alternize.com, tgl@sss.pgh.pa.us, pgsql-bugs@postgresql.org
  Subject: Re: BUG #3767: tsearch2 index creation fatal crash
  In-Reply-To: <4743B73C.4080606@alternize.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox