Re: Parser extensions (maybe for 10?)

From: José Luis Tallón <jltallon(at)adv-solutions(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Parser extensions (maybe for 10?)
Date: 2016-04-13 14:11:45
Message-ID: 570E53A1.2000405@adv-solutions.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 04/12/2016 06:45 AM, Craig Ringer wrote:
> On 12 April 2016 at 12:36, Arcadiy Ivanov <arcadiy(at)gmail(dot)com
> <mailto: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.
>

FWIW, I have previously sketched a "syntax rewriter" of sorts: a simple
filter which is applied to input before the lexer even sees it.
Quite some "syntax magic" can be achieved by allowing an extension to
*hook* into this functionality in order to do some rewriting; If turning
one statement into several (multi-statement) is also allowed quite some
serious emulation could be achieved.

I can certainly prepare a small patch for the first commitfest of 9.7 if
this sounds viable.

Thanks,

/ J.L.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-04-13 14:13:35 Re: Missing PG_INT32_MIN in numutils.c
Previous Message Tom Lane 2016-04-13 14:11:30 Re: Missing PG_INT32_MIN in numutils.c