From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Teodor Sigaev <teodor(at)sigaev(dot)ru> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, 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 15:19:30 |
Message-ID: | 45DDB482.9040602@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Teodor Sigaev wrote:
>> 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;
>
If we are worried about the size of the transition table and keeping it
in cache (see remarks from Tom upthread) then adding more keywords seems
a bad idea, as it will surely expand the table. OTOH, I'd hate to make
that a design criterion. My main worry has been that the grammar would
be stable.
Just to quantify all this, I did a quick check on the grammar using
bison -v - we appear to have 473 terminal symbols, and 420 non-terminal
sybols in 1749 rules, generating 3142 states. The biggest tables
generated are yytable and yycheck, each about 90kb on my machine.
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Markus Schiltknecht | 2007-02-22 15:20:05 | Re: SCMS question |
Previous Message | Alvaro Herrera | 2007-02-22 15:00:25 | Re: What is CheckPoint.undo needed for? |
From | Date | Subject | |
---|---|---|---|
Next Message | Markus Schiltknecht | 2007-02-22 16:20:55 | Re: tsearch in core patch, for inclusion |
Previous Message | Teodor Sigaev | 2007-02-22 15:00:29 | Re: First implementation of GIN for pg_trgm |