Skip site navigation (1) Skip section navigation (2)

Re: Preliminary patch for tsearch example dictionaries/parsers in contrib

From: karpov(at)sao(dot)ru (Sergey V(dot) Karpov)
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Preliminary patch for tsearch example dictionaries/parsers in contrib
Date: 2007-10-10 18:24:55
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> Oleg Bartunov <oleg(at)sai(dot)msu(dot)su> writes:
>> On Tue, 9 Oct 2007, Andrew Dunstan wrote:
>>> Are we in beta or not? To me, beta means nothing but bug fixes go in, 
>>> period. No ifs, no buts, no maybes, no exceptions. And that should 
>>> definitely go for contrib as well. We need a bit of self-discipline around 
>>> here.
>> the original intention was to have text search companion with code examples
>> for dictionaries and parser API and ability to keep them in workable
>> condition, instead of having them in SGML documentation.
> Yes.  I think that we can justify new contrib code here as a documentation
> bug fix: right now, the examples in sections 12.9 and 12.10 are wrong
> (obsolete), impossible to maintain (which is why they're obsolete;
> they failed to track code changes), and not in a format that's directly
> useful as a template for new code.
> However, the dict_regex code is not ready for a number of reasons,
> quite aside from the question of whether we want to add a dependency.
> I concur with the idea of dropping it for now.
> I'm a bit inclined to drop dict_roman as well, as it seems of
> questionable real use, and code-example-wise it adds nothing over
> dict_intdict.  That would leave us with two dictionary examples and one
> parser example, and I think both of the dictionaries look useful enough
> to be worth keeping.  (In particular I'd not vote for having only
> dict_intdict since it does not illustrate how to use a config file
> ... and we surely don't want to encourage people to not do that
> correctly.)

I've prepared reduced and renamed version of the examples. It may be
downloaded at


 - renamed to ts_examples to better reflect its purpose

 - dict_regex and dict_roman excluded, README corrected correspondingly

 - dict_xsyn now uses the same code to locate its config as built-in
   dictionaries, and can't access files outside
   $(prefix)/share/tsearch_data/. Example config file (which is also
   used in regression test) is installed to this
   folder. README.dict_xsyn mentions it.

 - source reformatted to better match PostgreSQL coding style

It still has a complicated source tree with subfolders for each
example. Have I to break it into three separate contrib modules? Or
combine into one with three build targets (this will break MSVC build)?

Sincerely your,

Sergey Karpov

In response to


pgsql-patches by date

Next:From: Henry B. HotzDate: 2007-10-10 18:35:00
Subject: Re: Preliminary GSSAPI Patches
Previous:From: Magnus HaganderDate: 2007-10-10 17:53:17
Subject: Re: Preliminary GSSAPI Patches

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group