On 12 April 2016 at 12:36, Arcadiy Ivanov <arcadiy@gmail.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.