Lists: | pgsql-hackers |
---|
From: | Robert Gravsjö <tekniksupport(at)blogg(dot)se> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Empty dictionary file when creating text search dictionary |
Date: | 2009-11-30 15:31:16 |
Message-ID: | 4B13E544.9080905@blogg.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Found this a couple of weeks back and just re-tested against head:
CREATE TEXT SEARCH DICTIONARY with an empty thesaurus file will crasch
the backend.
To reproduce:
$ echo "" > $(pg_config --sharedir)/tsearch_data/thesaurus_empty.ths
Then use this thesaurus to create a text search dictionary:
CREATE TEXT SEARCH DICTIONARY thesaurus_astro (
TEMPLATE = thesaurus,
DictFile = thesaurus_empty,
Dictionary = english_stem
);
It doesn't matter if the file is compleatly empty or just have comments.
The result is the same.
Add a word:
$ echo "foo: bar" >> $(pg_config
--sharedir)/tsearch_data/thesaurus_empty.ths
Creating the dictionary will now work.
Sorry I have no patch to attach.
Regards,
roppert
From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | robert(at)blogg(dot)se |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Empty dictionary file when creating text search dictionary |
Date: | 2009-12-01 17:57:50 |
Message-ID: | 200912011757.nB1HvoL00812@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
This is a duplicate report and has been fixed by Tom already.
---------------------------------------------------------------------------
Robert Gravsj wrote:
> Found this a couple of weeks back and just re-tested against head:
>
> CREATE TEXT SEARCH DICTIONARY with an empty thesaurus file will crasch
> the backend.
>
> To reproduce:
> $ echo "" > $(pg_config --sharedir)/tsearch_data/thesaurus_empty.ths
>
> Then use this thesaurus to create a text search dictionary:
> CREATE TEXT SEARCH DICTIONARY thesaurus_astro (
> TEMPLATE = thesaurus,
> DictFile = thesaurus_empty,
> Dictionary = english_stem
> );
>
> It doesn't matter if the file is compleatly empty or just have comments.
> The result is the same.
> Add a word:
> $ echo "foo: bar" >> $(pg_config
> --sharedir)/tsearch_data/thesaurus_empty.ths
>
> Creating the dictionary will now work.
>
> Sorry I have no patch to attach.
>
> Regards,
> roppert
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +