Re: tsearch in core patch, for inclusion

From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>
Subject: Re: tsearch in core patch, for inclusion
Date: 2007-02-22 13:26:23
Message-ID: 45DD99FF.4030404@sigaev.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

> In that proposed syntax, I would drop all "=", ",", "(", and ")". They
> don't seem necessary and they are untypical for SQL commands. I'd
> compare with CREATE FUNCTION or CREATE SEQUENCE for SQL commands that
> do similar things.

I was looking at CREATE TYPE mostly. With removing "=", ",", "(", and ")" in
CREATE/ALTER FULLTEXT it's needed to add several items in unreserved_keyword
list. And increase gram.y by adding new rules similar to OptRoleList instead of
simple opt_deflist:
'(' def_list ')' { $$ = $2; }
| /*EMPTY*/ { $$ = NIL; }
;

Is it acceptable?
List of new keywords is: LOCALE, LEXIZE, INIT, OPT, GETTOKEN, LEXTYPES, HEADLINE

So, syntax will be
CREATE FULLTEXT DICTIONARY dictname
LEXIZE lexize_function
[ INIT init_function ]
[ OPT opt_text ];

CREATE FULLTEXT DICTIONARY dictname
[ { LEXIZE lexize_function | INIT init_function | OPT opt_text } [...] ]
LIKE template_dictname;

--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian G. Pflug 2007-02-22 13:26:41 What is CheckPoint.undo needed for?
Previous Message Pavan Deolasee 2007-02-22 13:24:06 Re: HOT for PostgreSQL 8.3

Browse pgsql-patches by date

  From Date Subject
Next Message Teodor Sigaev 2007-02-22 13:33:57 Re: tsearch in core patch, for inclusion
Previous Message Teodor Sigaev 2007-02-22 12:56:39 Re: First implementation of GIN for pg_trgm