Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id E36302E0056 for ; Wed, 21 Nov 2007 00:42:52 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 67567-02 for ; Wed, 21 Nov 2007 00:42:45 -0400 (AST) Received: from mail.refusion.com (mail.refusion.com [213.144.155.20]) by postgresql.org (Postfix) with ESMTP id DF5B72E0054 for ; Wed, 21 Nov 2007 00:42:45 -0400 (AST) Received: from [192.168.2.10] by mail.refusion.com (Cipher TLSv1:RC4-MD5:128) (MDaemon PRO v9.5.4) with ESMTP id md50002625573.msg for ; Wed, 21 Nov 2007 05:42:41 +0100 Message-ID: <4743B73C.4080606@alternize.com> Date: Wed, 21 Nov 2007 05:42:36 +0100 From: "Thomas H." User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Tom Lane CC: pgsql-bugs@postgresql.org Subject: Re: BUG #3767: tsearch2 index creation fatal crash 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> In-Reply-To: <22471.1195616725@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated-Sender: info@alternize.com X-Spam-Processed: mail.refusion.com, Wed, 21 Nov 2007 05:42:41 +0100 (not processed: message from trusted or authenticated source) X-MDRemoteIP: 77.56.93.225 X-Return-Path: me@alternize.com X-Envelope-From: me@alternize.com X-MDaemon-Deliver-To: pgsql-bugs@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/264 X-Sequence-Number: 18908 >> 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