Preliminary patch for tsearch example dictionaries/parsers in contrib

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-patches(at)postgreSQL(dot)org
Cc: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, Sergey Karpov <karpov(at)sao(dot)ru>
Subject: Preliminary patch for tsearch example dictionaries/parsers in contrib
Date: 2007-10-08 23:25:14
Message-ID: 3049.1191885914@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
ts_pack.tar.gz application/octet-stream 41.0 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2007-10-09 00:20:45 Re: Patch to inline stable SQL set returning UDFs
Previous Message Tom Lane 2007-10-08 22:09:25 Re: txid strtoull fix