From: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, Teodor Sigaev <teodor(at)sigaev(dot)ru>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: Fix for stop words in thesaurus file |
Date: | 2007-11-09 09:16:54 |
Message-ID: | 1194599814.4251.362.camel@ebony.site |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers pgsql-patches |
On Thu, 2007-11-08 at 21:32 -0500, Bruce Momjian wrote:
> Tom Lane wrote:
> > Bruce Momjian <bruce(at)momjian(dot)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.
So this fix requires people to have a different dictionary file from 8.2
to 8.3, and to manually edit the file? That makes upgrade even harder
and more error prone.
Seems easier to do it the way Tom suggested and only emit notices in the
first case.
I notice there's still a placeholder in the docs for how to upgrade.
Perhaps if we wrote that now it would make it clearer where the
difficulties lie?
--
Simon Riggs
2ndQuadrant http://www.2ndQuadrant.com
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2007-11-09 09:21:53 | Re: pgsql: If an index depends on no columns of its table, give it a |
Previous Message | Tom Lane | 2007-11-09 09:05:58 | Re: pgsql: If an index depends on no columns of its table, give it a |
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2007-11-09 09:17:05 | Re: New tzdata available |
Previous Message | Jorgen Austvik - Sun Norway | 2007-11-09 08:30:47 | Re: How to determine if psql returns ZERO to the "shell" and finished successfully? |
From | Date | Subject | |
---|---|---|---|
Next Message | Jan Urbański | 2007-11-09 11:44:07 | Re: a tsearch2 (8.2.4) dictionary that only filters out stopwords |
Previous Message | Simon Riggs | 2007-11-09 08:22:05 | Re: [HACKERS] Connection Pools and DISCARD ALL |