Re: [PATCH] Add --syntax to postgres for SQL syntax checking

From: Josef Šimánek <josef(dot)simanek(at)gmail(dot)com>
To: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
Cc: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Lukas Fittl <lukas(at)fittl(dot)com>
Subject: Re: [PATCH] Add --syntax to postgres for SQL syntax checking
Date: 2024-02-26 09:31:53
Message-ID: CAFp7Qwrux4GjV2tZxseRnDD=hy3YArYVV67uRqr8H5EV+cv-4Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

po 26. 2. 2024 v 8:20 odesílatel Jelte Fennema-Nio <postgres(at)jeltef(dot)nl> napsal:
>
> On Sun, 25 Feb 2024 at 23:34, Josef Šimánek <josef(dot)simanek(at)gmail(dot)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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2024-02-26 09:43:31 Re: Improve eviction algorithm in ReorderBuffer
Previous Message Andrei Lepikhov 2024-02-26 09:30:50 Re: "type with xxxx does not exist" when doing ExecMemoize()