Re: [PROPOSAL] Improvements of Hunspell dictionaries support - Mailing list pgsql-hackers

From Artur Zakirov
Subject Re: [PROPOSAL] Improvements of Hunspell dictionaries support
Date
Msg-id 5691466D.4020807@postgrespro.ru
Whole thread Raw
In response to Re: [PROPOSAL] Improvements of Hunspell dictionaries support  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: [PROPOSAL] Improvements of Hunspell dictionaries support  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
<div class="moz-cite-prefix">On 09.01.2016 05:38, Alvaro Herrera wrote:<br /></div><blockquote
cite="mid:20160109023835.GA670563@alvherre.pgsql"type="cite"><pre wrap="">Artur Zakirov wrote:
 

</pre><blockquote type="cite"><pre wrap="">Now almost all dictionaries are loaded into PostgreSQL. But the da_dk
dictionary does not load. I see the following error:

ERROR: invalid regular expression: quantifier operand invalid
CONTEXT: line 439 of configuration file
"/home/artur/progs/pgsql/share/tsearch_data/da_dk.affix": "SFX 55 0 s
+GENITIV

If you open the affix file in editor you can see that there is incorrect
format of the affix 55 in 439 line (screen1.png):
</pre></blockquote><pre wrap=""> [ another email ]

</pre><blockquote type="cite"><pre wrap="">I also had implemented a patch that fixes an error from the e-mail
<a class="moz-txt-link-freetext"
href="http://www.postgresql.org/message-id/562E1073.8030805@postgrespro.ru">http://www.postgresql.org/message-id/562E1073.8030805@postgrespro.ru</a>
This patch just ignore that error.
</pre></blockquote><pre wrap="">
I think it's a bad idea to just ignore these syntax errors.  This affix
file is effectively corrupt, after all, so it seems a bad idea that we
need to cope with it.  I think it would be better to raise the error
normally and instruct the user to fix the file; obviously it's better if
the upstream provider of the file fixes it.

Now, if there is proof somewhere that the file is correct, then the code
must cope in some reasonable way.  But in any case I don't think this
change is acceptable ... it can only cause pain, in the long run.
</pre></blockquote> This error is raised in Danish dictionary because of erroneous entry in the .affix file. I sent a
bug-reportto developer. He fixed this bug. Corrected dictionary can be downloaded from LibreOffice site.<br /><br /> I
undothe changes and the error will be raised. I will update the patch soon.<br /><pre class="moz-signature"
cols="72">--
 
Artur Zakirov
Postgres Professional: <a class="moz-txt-link-freetext"
href="http://www.postgrespro.com">http://www.postgrespro.com</a>
Russian Postgres Company</pre>

pgsql-hackers by date:

Previous
From: Artur Zakirov
Date:
Subject: Re: [PROPOSAL] Improvements of Hunspell dictionaries support
Next
From: Tom Lane
Date:
Subject: Re: [PATCH] Add STRICT to some regression test C functions.