Weird problem concerning tsearch functions built into postgres 8.3, assistance requested

From: Andrew Edson <cheighlund(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Weird problem concerning tsearch functions built into postgres 8.3, assistance requested
Date: 2008-10-29 17:09:28
Message-ID: 90172.97137.qm@web34205.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I've been tasked with maintaining a set of postgres databases created by my predecessor in this position.  The original databases several years back were version 8.1.3, and used the tsearch2 functions to enable some client-program searches.

We've recently begun preparing to shift to 8.3 (I believe the current starter box we're putting together for cloning is running 8.3.1), and I've been having a bit of trouble with the built-in searching.  I think I've got it mostly fixed after following a few leads online, but I've run across one last little bit of problem that I can't figure out how to get around, and that doesn't make much sense to me.  Admittedly, I don't know very much about tsearch.

One of the tables we're using in the 8.1.3 setups currently running includes phone numbers as a searchable field (fti_phone), with the results of a select on the field generally looking like this: 'MMM':2 'NNNN':3 'MMM-NNNN':1.  MMM is the first three digits, NNNN is the fourth-seventh.

The weird part is this: On the old systems running 8.1.3, I can look up a record by
fti_phone using any of the three above items; first three, last four, or entire number including dash.  On the new system running 8.3.1, I can do a lookup by the first three or the last four and get the results I'm after, but any attempt to do a lookup by the entire MMM-NNNN version returns no records.

I saw nothing concerning this while I was looking for information on how to get the search functions properly working in postgres 8.3.1, nor have I specifically seen anything since running across that problem.  The latter, however, may simply be because I don't know how to properly phrase my searches.

Does anyone have any information they would be willing to share regarding this issue, or a link to a website which discusses it?  I would greatly appreciate any advice I may be given.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thom Brown 2008-10-29 17:21:08 Re: Can't restart Postgres
Previous Message Grzegorz Jaśkiewicz 2008-10-29 16:55:08 Re: Are there plans to add data compression feature to postgresql?