Preliminary patch for tsearch example dictionaries/parsers in contrib - Mailing list pgsql-patches

From Tom Lane
Subject Preliminary patch for tsearch example dictionaries/parsers in contrib
Date
Msg-id 3049.1191885914@sss.pgh.pa.us
Whole thread Raw
Responses Re: Preliminary patch for tsearch example dictionaries/parsers in contrib
List pgsql-patches
Given all the flap about txid, this surely mustn't go in without public
review first ;-).  So, here is a submission from Sergey Karpov to fill
in the lack of any working code examples for user-written tsearch
parsers and dictionaries.

I will be mostly off-line for the next day or so and don't have time to
work on this more now, but here are a few comments:

* It seems a bit odd to put multiple independent contrib modules under a
single subfolder.  I'd be inclined to drop the ts_pack layer and just
make the dictionaries and parser be top-level contrib modules.

* Depending on PCRE, when we have an at-least-equally-good regex engine
built in, is silly.  It's an unnecessary dependency and to the (minor)
extent that the regex syntax is different, we'd have to document the
discrepancies.

* dict_regex is not nearly up to speed on encoding or locale issues.
I didn't look at the other ones too closely, they may or may not need
similar adjustments.

* Allowing config files to be read from anywhere is not acceptable.
We have dealt with this in the core code and the contrib examples
*must* follow the same rules.

* The whole "utils" part of dict_regex should probably go away; it
is reinventing wheels that already exist in the Postgres backend
environment.  Since these are meant to be code examples, they should
show the best ways of doing things within Postgres.

            regards, tom lane


Attachment

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: txid strtoull fix
Next
From: Bruce Momjian
Date:
Subject: Re: Patch to inline stable SQL set returning UDFs