From: | Craig Ringer <craig(at)2ndquadrant(dot)com> |
---|---|
To: | Arcadiy Ivanov <arcadiy(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Parser extensions (maybe for 10?) |
Date: | 2016-04-12 04:45:33 |
Message-ID: | CAMsr+YFHfJ7YKcRCUP_BdJZ+SHwoF9CdEvk8b-opVRDrHXf7uw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 12 April 2016 at 12:36, Arcadiy Ivanov <arcadiy(at)gmail(dot)com> wrote:
>
> Is there any interest and/or tips to allow a pluggable parser or at least
> allow some syntactical pluggability by extensions?
> I think this may allow some projects to move towards becoming an extension
> as opposed to forking the project entirely.
>
How would you go about it?
PostgreSQL uses a parser generator that produces C code as its output.
Extensions can't just patch the grammar and regenerate the parser. So even
if it were desirable, a fully extensible parser would require a total
rewrite of the parser/lexer.
That doesn't mean there can't be extension points for SQL syntax, they just
need to be planned carefully, located where they won't create parsing
ambiguities, and somewhat limited.
--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Tsunakawa, Takayuki | 2016-04-12 04:58:05 | Re: Parser extensions (maybe for 10?) |
Previous Message | Arcadiy Ivanov | 2016-04-12 04:36:42 | Parser extensions (maybe for 10?) |