Re: improvements for dict_xsyn extended synonym dictionary - RRR - Mailing list pgsql-hackers

From Andres Freund
Subject Re: improvements for dict_xsyn extended synonym dictionary - RRR
Date
Msg-id 200907260401.30243.andres@anarazel.de
Whole thread Raw
In response to improvements for dict_xsyn extended synonym dictionary  (karpov@sao.ru (Sergey V. Karpov))
Responses Re: improvements for dict_xsyn extended synonym dictionary - RRR
List pgsql-hackers
Hi Sergey,

On Tuesday 14 July 2009 21:35:28 Sergey V. Karpov wrote:
> attached is a simple patch that extends the functionality of dict_xsyn
> extended synonym dictionary (from contrib) by adding the following
> configuration option:
>
> - "mode" option controls the current dictionary mode of operation. Can be
> one of:
>
>   - in "simple" mode it accepts the original word and returns all synonyms
>     as ORed lis.
>
>   - when mode is "symmetric", the dictionary accepts the original word or
>     any of its synonyms, and return all others as ORed list.
>
>   - in "map" regime it accepts any synonym and returns the original word
>     instead of it. Also, it accepts and returns the original word
>     itself, even if keeporig is false.
Some points:
- Patch looks generally sound
- lacks a bit of a motivational statement, even though one can imagine uses
- Imho mode=MAP should error out if keeporig is false
- I personally find the the names for the different modes a bit nondescriptive. One possibility would be to introduce
parameterslike:- matchorig- matchsynonym- keeporig- keepsynonym
 
That sounds way much easier to grasp for me.

Comments?

Andres


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: autogenerating headers & bki stuff
Next
From: KaiGai Kohei
Date:
Subject: Re: SE-PostgreSQL Specifications