Re: tsearch in core patch, for inclusion

From: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>
To: Markus Schiltknecht <markus(at)bluegap(dot)ch>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <bruce(at)momjian(dot)us>, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Teodor Sigaev <teodor(at)sigaev(dot)ru>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: tsearch in core patch, for inclusion
Date: 2007-02-21 14:59:17
Message-ID: 45DC5E45.4060206@phlo.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Markus Schiltknecht wrote:
>>> Are there any ongoing efforts to rewrite the parser (i.e. using
>>> another algorithm, like a recursive descent parser)?
>> Why would you want to do that?
>
> I recall having read something about rewriting the parser. Together with
> Tom being worried about parser performance and knowing GCC has switched
> to a hand written parser some time ago, I suspected bison to be slow.
> That's why I've asked.

I think the case is different for C and C++. The grammars of C and C++
appear to be much more parser-friendly then SQL, making handcrafting
a parser easier I'd think. And I believe that one of the reasons gcc
wasn't happy with bison was that I limited the quality of their error
reporting - which isn't that much of a problem for SQL, since SQL
statements are rather short compared to your typical C/C++ source file.

Last, but not least, the C and C++ syntax is basically set in stone - At
least now the g++ supports nearly all (or all? don't know) of the C++
standard. So it doesn't really matter if changes to the parse are a bit
more work, because the rarely happen. Postgres seems to add new features
that change the grammar with every release (with is a good thing!).

greetings, Florian Pflug

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian G. Pflug 2007-02-21 15:09:08 Re: New feature request: FlashBack Query
Previous Message Florian G. Pflug 2007-02-21 14:59:12 Re: Column storage positions

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2007-02-21 15:09:45 Re: tsearch in core patch, for inclusion
Previous Message Tom Lane 2007-02-21 14:54:13 Re: tsearch in core patch, for inclusion