Re: [PATCH] Add --syntax to postgres for SQL syntax checking - Mailing list pgsql-hackers

From Josef Šimánek
Subject Re: [PATCH] Add --syntax to postgres for SQL syntax checking
Date
Msg-id CAFp7Qwrux4GjV2tZxseRnDD=hy3YArYVV67uRqr8H5EV+cv-4Q@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Add --syntax to postgres for SQL syntax checking  (Jelte Fennema-Nio <postgres@jeltef.nl>)
List pgsql-hackers
po 26. 2. 2024 v 8:20 odesílatel Jelte Fennema-Nio <postgres@jeltef.nl> napsal:
>
> On Sun, 25 Feb 2024 at 23:34, Josef Šimánek <josef.simanek@gmail.com> wrote:
> > Exposing parser to frontend tools makes no sense to me
>
> Not everyone seems to agree with that, it's actually already done by
> Lukas from pganalyze: https://github.com/pganalyze/libpg_query

I did a quick look. That's clearly amazing work, but it is not parser
being exposed to frontend (refactored). It is (per my understanding)
backend code isolated to minimum to be able to parse query. It is
still bound to individual backend version and to backend source code.
And it is close to my effort (I was about to start with a simpler
version not providing tokens, just the result), but instead of copying
files from backend into separate project and shave off to minimum,
provide the same tool with backend utils directly.



pgsql-hackers by date:

Previous
From: Bertrand Drouvot
Date:
Subject: Re: Documentation: warn about two_phase when altering a subscription
Next
From: Tomas Vondra
Date:
Subject: Re: Improve eviction algorithm in ReorderBuffer