Thread: ispell/hunspell imprecision in error message
I was trying to look up the background of this error message: "Ispell dictionary supports only \"default\", \"long\", and \"num\" flag value" (src/backend/tsearch/spell.c) But I found that this actually talks about Hunspell format dictionaries.(So the man page is hunspell(5) as opposed to ispell(5).) While as far as the tsearch interfaces are concerned, those two are lumped together, should we not change the error message to refer to Hunspell? -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
On 25.07.2016 19:53, Peter Eisentraut wrote: > I was trying to look up the background of this error message: > > "Ispell dictionary supports only \"default\", \"long\", and \"num\" flag > value" > > (src/backend/tsearch/spell.c) > > But I found that this actually talks about Hunspell format dictionaries. > (So the man page is hunspell(5) as opposed to ispell(5).) While as far > as the tsearch interfaces are concerned, those two are lumped together, > should we not change the error message to refer to Hunspell? > Hello, As I understand, this error message refers to the Ispell dictionary template. This template can use various dictionary formats. Which is confusing. Maybe would be better to change dictionary template name. But it can break backward compatibility... If we want to change the error message, maybe change it to the following? "Hunspell dictionary format supports only \"default\", \"long\", and \"num\" flag value" -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company
Artur Zakirov <a.zakirov@postgrespro.ru> writes: > On 25.07.2016 19:53, Peter Eisentraut wrote: >> But I found that this actually talks about Hunspell format dictionaries. >> (So the man page is hunspell(5) as opposed to ispell(5).) While as far >> as the tsearch interfaces are concerned, those two are lumped together, >> should we not change the error message to refer to Hunspell? > As I understand, this error message refers to the Ispell dictionary > template. This template can use various dictionary formats. Which is > confusing. Maybe would be better to change dictionary template name. But > it can break backward compatibility... I think the error message has to refer to the ispell dictionary type by its assigned name, otherwise you'll just create even more confusion. (In other words, I read the message as talking about PG's ispell dictionary code, not about somebody else's ispell man file.) The right place to explain that ispell accepts hunspell-formatted files, or to link to specifications of what that means, is in the documentation. Section 12.6.5 already says that, but maybe it could be expanded/rewritten a little. regards, tom lane