Re: Proposal: syntax of operation with tsearch's configuration - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Proposal: syntax of operation with tsearch's configuration
Date
Msg-id 22348.1163806644@sss.pgh.pa.us
Whole thread Raw
In response to Re: Proposal: syntax of operation with tsearch's configuration  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-hackers
Martijn van Oosterhout <kleptog@svana.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


pgsql-hackers by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Proposal: syntax of operation with tsearch's configuration
Next
From: "Matt Miller"
Date:
Subject: Re: [GENERAL] Allowing SYSDATE to Work