Re: Parser extensions (maybe for 10?)
От | Craig Ringer |
---|---|
Тема | Re: Parser extensions (maybe for 10?) |
Дата | |
Msg-id | CAMsr+YFHfJ7YKcRCUP_BdJZ+SHwoF9CdEvk8b-opVRDrHXf7uw@mail.gmail.com обсуждение исходный текст |
Ответ на | Parser extensions (maybe for 10?) (Arcadiy Ivanov <arcadiy@gmail.com>) |
Ответы |
Re: Parser extensions (maybe for 10?)
|
Список | pgsql-hackers |
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.
В списке pgsql-hackers по дате отправления: