Re: tsearch_core patch: permissions and security issues - Mailing list pgsql-hackers

From Teodor Sigaev
Subject Re: tsearch_core patch: permissions and security issues
Date
Msg-id 4671A44D.6020105@sigaev.ru
Whole thread Raw
In response to Re: tsearch_core patch: permissions and security issues  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
>> It should be. Instances of ispell (and synonym, thesaurus) dictionaries are 
>> different only in dict_initoption part, so it will be only one entry in 
>> pg_ts_dict_template and several ones in pg_ts_dict.
> 
> No, I was thinking of still having just one pg_ts_dict catalog (no template)
> but removing its dictinit field.  Instead, the init strings would be
> stored with configuration mapping entries.
> 
> This would mean having to remember to provide the right option along
> with the dictionary name when doing ALTER CONFIGURATION ADD MAPPING.
> Not sure if that would be harder or easier to use than what you're
> thinking of.

Hmm. Dictionary may present in several lists of dictionaries in one 
configuration. Suppose, it isn't practical to store dictinitoption 
several times. In other hand, the same dictionary (template) with 
different init option may present on configuration too. Typical example 
is configuration for russian language:
lword, lpword tokens have dictionary's list {ispell_en, stem_en}
nlword, nlpword tokens have dictionary's list {ispell_ru, stem_ru}

stem_(ru|en) is a Snowball's stemmer, but ispell_(ru|en) is a ispell 
dictionary (template) with different dictinitoption. Next, 
configurations may share dictionaries.

And, init option may be rather big.



pgsql-hackers by date:

Previous
From: Gregory Stark
Date:
Subject: Re: tsearch_core patch: permissions and security issues
Next
From: Tom Lane
Date:
Subject: Re: Change sort order on UUIDs?