From: | Hannu Krosing <hannuk(at)google(dot)com> |
---|---|
To: | "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com> |
Cc: | Andrew Dunstan <andrew(at)dunslane(dot)net>, Chapman Flack <chap(at)anastigmatix(dot)net>, Julien Rouhaud <rjuju123(at)gmail(dot)com>, jacktby <jacktby(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: How to build a new grammer for pg? |
Date: | 2023-08-08 11:24:24 |
Message-ID: | CAMT0RQT7MX+Gz5os13maYYHbSenDjQm_FuLJeBrQhPZALkd1-g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I would look at how Babelfish DB did it when adding SQL Server compatibility
https://babelfishpg.org/ and https://github.com/babelfish-for-postgresql/
another source to inspect could be
https://github.com/IvorySQL/IvorySQL for "oracle compatible
PostgreSQL"
On Tue, Aug 1, 2023 at 10:07 PM Jonah H. Harris <jonah(dot)harris(at)gmail(dot)com> wrote:
>
> On Tue, Aug 1, 2023 at 3:45 PM Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>>
>> Or to enable some language other than SQL (QUEL anyone?)
>
>
> A few years ago, I got a minimal POSTQUEL working again to release as a patch for April Fools' Day, which I never did. I should dig that up somewhere :)
>
> Anyway, as far as OP's original question regarding replacing the grammar, there are a couple of such implementations floating around that have done that. But, I actually think the pluggable parser patches were good examples of how to integrate a replacement parser that generates the expected parse tree nodes for anyone who wants to do their own custom parser. See Julien Rouhaud's SQLOL in the "Hook for extensible parsing" thread and Jim Mlodgenski's "Parser Hook" thread.
>
> --
> Jonah H. Harris
>
From | Date | Subject | |
---|---|---|---|
Next Message | Ashutosh Bapat | 2023-08-08 11:33:56 | Re: Oversight in reparameterize_path_by_child leading to executor crash |
Previous Message | John Naylor | 2023-08-08 11:18:51 | Re: Avoid stack frame setup in performance critical routines using tail calls |