Re: Fix for stop words in thesaurus file - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: Fix for stop words in thesaurus file
Date
Msg-id 200711101540.lAAFeYS20251@momjian.us
Whole thread Raw
In response to Fix for stop words in thesaurus file  (Bruce Momjian <bruce@momjian.us>)
List pgsql-patches
Bruce Momjian wrote:
> Tom Lane wrote:
> > Bruce Momjian <bruce@momjian.us> writes:
> > > Tom Lane wrote:
> > >> One possible real solution would be to tweak the dictionary APIs so
> > >> that the dictionaries can find out whether this is the first load during
> > >> a session, or a reload, and emit notices only in the first case.
> >
> > > Yea, that would work too.  Or just throw an error for a stop word in the
> > > file and then you never get a reload (use "*" instead).
> >
> > Hm, that's a thought --- it'd be a way to solve the problem without an
> > API change for dictionaries, which is something to avoid at this late
> > stage of the 8.3 cycle.  Come to think of it, does the ts_cache stuff
> > work properly when an error is thrown in dictionary load (ie, is the
> > cache entry left in a sane state)?
>
> I have developed the attached patch which uses "?" to mark stop words in
> the thesaurus file.  ("*" was already in use in the file.)  I updated
> the docs to use "?", which makes the documentation clearer too.
>
> The patch also reenables testing of stop words in the thesuarus file.
>
> FYI, there is no longer a NOTICE for stop words in the thesaurus file;
> it throws an error now, and says to use "?" instead.

Patch applied.  I added documentation on this API change too.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://postgres.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Connection Pools and DISCARD ALL
Next
From: Tom Lane
Date:
Subject: Re: tsearch2api .. wrapper for integrated fultext