Re: tsvector/tsearch equality and/or portability issue

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Phil Frost <indigo(at)bitglue(dot)com>
Cc: Teodor Sigaev <teodor(at)sigaev(dot)ru>, Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: tsvector/tsearch equality and/or portability issue
Date: 2006-08-28 21:57:48
Message-ID: 18800.1156802268@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Phil Frost <indigo(at)bitglue(dot)com> writes:
> Things still seem to be broken for me. Among other things, the script at
> <http://unununium.org/~indigo/testvectors.sql.bz2> fails. It performs two
> tests, comparing 1000 random vectors with positions and random weights, and
> comparing the same vectors, but stripped. Oddly, the unstripped comparisons all
> pass, which is not consistant with what I am seeing in my database. However,
> I'm yet unable to reproduce those problems.

It looks to me like tsvector comparison may be too strong. The strip()
function evidently thinks that it's OK to rearrange the string chunks
into the same order as the WordEntry items, which suggests to me that
the "pos" fields are not really semantically significant. But
silly_cmp_tsvector() considers that a difference in pos values is
important. I don't understand the data structure well enough to know
which one to believe, but something's not consistent here.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2006-08-28 21:58:47 Re: Rtree circle ops
Previous Message Joachim Wieland 2006-08-28 21:03:25 Re: [PATCHES] Another VPATH patch for ecpg