Re: IN clause behaving badly with missing comma and line break

Поиск
Список
Период
Сортировка
От Philip Semanchuk
Тема Re: IN clause behaving badly with missing comma and line break
Дата
Msg-id 65C07914-4AB4-43F5-BC5B-E73F1FE99185@americanefficient.com
обсуждение исходный текст
Ответ на Re: IN clause behaving badly with missing comma and line break  (Francisco Olarte <folarte@peoplecall.com>)
Список pgsql-bugs

> On Jan 18, 2023, at 11:06 AM, Francisco Olarte <folarte@peoplecall.com> wrote:
>
> On Wed, 18 Jan 2023 at 16:21, Philip Semanchuk
> <philip@americanefficient.com> wrote:
>
>> .... We’ve adopted a formatting standard that helps us to avoid surprises due to missing commas. We put one string
literalon each line and place the commas all in the same column with a significant amount of white space to the left of
thecommas. With this safeguard in place, it’s very easy to spot a missing comma. 
>>
>> WHERE t IN ('a'      ,
>>            'foo'    ,
>>            'bar'    ,
>>            )
>
> I believe that one is a syntax error ( last comma ).


Ooops, yes, thanks for catching that. I spend about half of my time in Python where that trailing comma is acceptable
andidiomatic. Not so much in SQL. :-) 






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

Предыдущее
От: Francisco Olarte
Дата:
Сообщение: Re: IN clause behaving badly with missing comma and line break
Следующее
От: "Sam.Mesh"
Дата:
Сообщение: Re: index not used for bigint without explicit cast