Re: A couple of tsearch loose ends

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, Teodor Sigaev <teodor(at)sigaev(dot)ru>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: A couple of tsearch loose ends
Date: 2007-08-22 03:28:07
Message-ID: 200708220328.l7M3S7h13790@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> There are a couple of naming issues that I left untouched while
> reviewing the tsearch patch, but wanted to bring up for discussion.
>
> One thing that had me confused for awhile is that the patch uses
> the word "template" in two different ways. The main use is that a
> "template" is an object encapsulating the superuser-only aspects of
> defining a dictionary. When you do CREATE TEXT SEARCH DICTIONARY
> you have to specify a template to base it on. So in this context
> a dictionary and its template are different kinds of objects, and
> there's a persistent connection between them.

What has me concerned is the idea of database templates being different
from text search dictionary templates? Why can't they function the same
way?

> On the other hand, CREATE TEXT SEARCH CONFIGURATION also uses the
> word "template", but in this case it's an optional specification
> of an existing configuration that gets copied. So here, the config
> and the template are the same kind of object, and there's no
> connection between them after the copy is made.
>
> This seems a bit confusing, and I wonder whether we ought not
> change the terminology for one thing or the other. I don't
> particularly want to rename text search templates ... that would
> be quite a bit of work at this point ... so what I'd suggest is
> that the option to CREATE TEXT SEARCH CONFIGURATION be renamed
> "COPY" instead of "TEMPLATE". Another thought here is that I'm
> inclined to drop the "with map" option and just always copy the
> source configuration exactly. If you don't want the map, the
> only other information the source can provide is a parser name,
> which you might as well just give directly.

Agreed on the use of COPY. I already pointed out this confusion in a
previous email.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Oleg Bartunov 2007-08-22 03:38:43 Re: A couple of tsearch loose ends
Previous Message Bruce Momjian 2007-08-22 03:22:42 Re: Is ALTER TEXT SEARCH CONFIGURATION PARSER = new_parser really sane?