Re: A couple of tsearch loose ends

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: A couple of tsearch loose ends
Дата
Msg-id 200708220328.l7M3S7h13790@momjian.us
обсуждение исходный текст
Ответ на A couple of tsearch loose ends  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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@momjian.us>          http://momjian.us EnterpriseDB
http://www.enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Is ALTER TEXT SEARCH CONFIGURATION PARSER = new_parser really sane?
Следующее
От: Oleg Bartunov
Дата:
Сообщение: Re: A couple of tsearch loose ends