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

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: [PATCH] Add --syntax to postgres for SQL syntax checking
Дата
Msg-id 6ffc71444c303b8309c78a3d834d5ce319f187a7.camel@cybertec.at
обсуждение исходный текст
Ответ на Re: [PATCH] Add --syntax to postgres for SQL syntax checking  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, 2024-05-15 at 14:39 -0400, Tom Lane wrote:
> The thing that was bothering me most about this is that I don't
> understand why that's a useful check.  If I meant to type
>
>     UPDATE mytab SET mycol = 42;
>
> and instead I type
>
>     UPDATEE mytab SET mycol = 42;
>
> your proposed feature would catch that; great.  But if I type
>
>     UPDATE mytabb SET mycol = 42;
>
> it won't.  How does that make sense?

It makes sense to me.  I see a clear distinction between "this is a
valid SQL statement" and "this is an SQL statement that will run on
a specific database with certain objects in it".

To me, "correct syntax" is the former.

Yours,
Laurenz Albe



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Aleksander Alekseev
Дата:
Сообщение: Re: Postgres and --config-file option
Следующее
От: Jelte Fennema-Nio
Дата:
Сообщение: Re: Add new protocol message to change GUCs for usage with future protocol-only GUCs