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 CAFp7QwqFO9YiXCXUNX8dHWHkBmKT5-Q3Qa1D4OnvnPBYCYZtWA@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Add --syntax to postgres for SQL syntax checking  (Laurenz Albe <laurenz.albe@cybertec.at>)
Responses Re: [PATCH] Add --syntax to postgres for SQL syntax checking
List pgsql-hackers


Dne pá 15. 12. 2023 14:09 uživatel Laurenz Albe <laurenz.albe@cybertec.at> napsal:
On Fri, 2023-12-15 at 13:21 +0100, Josef Šimánek wrote:
> Inspired by Simon Riggs' keynote talk at PGCounf.eu 2023 sharing list
> of ideas for PostgreSQL
> (https://riggs.business/blog/f/postgresql-todo-2023), I have crafted a
> quick patch to do SQL syntax validation.
>
> What do you think?

I like the idea.  But what will happen if the SQL statement references
tables or other objects, since we have no database?

It checks just the identifier is valid from parser perspective, like it is valid table name.


Yours,
Laurenz Albe

pgsql-hackers by date:

Previous
From: hubert depesz lubaczewski
Date:
Subject: Re: pgBufferUsage.blk_{read|write}_time are zero although there are pgBufferUsage.local_blks_{read|written}
Next
From: Pavel Stehule
Date:
Subject: Re: [PATCH] Add --syntax to postgres for SQL syntax checking