Re: Proposal: syntax of operation with tsearch's configuration

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Teodor Sigaev <teodor(at)sigaev(dot)ru>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: syntax of operation with tsearch's configuration
Date: 2006-11-17 23:37:24
Message-ID: 22348.1163806644@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Martijn van Oosterhout <kleptog(at)svana(dot)org> writes:
> On Fri, Nov 17, 2006 at 03:53:35PM -0500, Tom Lane wrote:
>> Given the nonextensibility of gram.y and keywords.c, it has to be in
>> core to even think about having special syntax :-(

> Has anyone ever heard of extensible grammers?

Yeah, I worked with systems that could do that at Hewlett-Packard, nigh
thirty years ago ... but they were much less pleasant to use than bison,
and if memory serves, slower and more limited in what they could parse
(something narrower than LALR(1), IIRC, which would make certain parts
of SQL even hairier to parse than they are now). I'm not in a big hurry
to go there, even though it would certainly take some of the steam out
of "I want this in core" arguments.

> ... decree that commands beginning with @ are extensions and are parsed
> by the module listed next. Then your command set becomes:

> @tsearch CREATE PARSER ....

This'd only work well for trivial standalone commands; as a counterexample
consider CREATE INDEX, which requires access to the core sub-grammars
for typename and expression. The SQL2003 XML additions couldn't be
handled this way either.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ron Johnson 2006-11-17 23:55:08 Re: Allowing SYSDATE to Work
Previous Message Tom Lane 2006-11-17 23:25:17 pgsql: Clarify description of CIDR-address column of pg_hba.conf, to