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

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Josef Šimánek <josef(dot)simanek(at)gmail(dot)com>
Cc: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] Add --syntax to postgres for SQL syntax checking
Date: 2023-12-15 13:19:07
Message-ID: CAFj8pRCRKgBbyEEcvF2UOy7RGtcmjLjBrY8zR7pCkr36RM5ttg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dne pá 15. 12. 2023 14:14 uživatel Josef Šimánek <josef(dot)simanek(at)gmail(dot)com>
napsal:

>
>
> Dne pá 15. 12. 2023 14:09 uživatel Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)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.
>

There can by two levels, like plpgsql or like pllgsql_check

Regards

Pavel

>
>
>> Yours,
>> Laurenz Albe
>>
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Emre Hasegeli 2023-12-15 13:35:46 Re: "pgoutput" options missing on documentation
Previous Message Josef Šimánek 2023-12-15 13:14:11 Re: [PATCH] Add --syntax to postgres for SQL syntax checking