Re: BUG #14394: No error raised in IN-clause when commas are missing

Поиск
Список
Период
Сортировка
От Erik Rijkers
Тема Re: BUG #14394: No error raised in IN-clause when commas are missing
Дата
Msg-id 757c799204a29dbd3dafc33e0bbffe5a@xs4all.nl
обсуждение исходный текст
Ответ на BUG #14394: No error raised in IN-clause when commas are missing  (andreas.imboden@bl.ch)
Список pgsql-bugs
On 2016-10-24 16:28, andreas.imboden@bl.ch wrote:
> The following bug has been logged on the website:
>
> Bug reference:      14394

> -- not correct, result = 3
> -- no comma after 'two', no error message, incorrect result
> select sum(cvalue) from abug
>  where cname in (
>     'one',
>     'two'
>     'three',
>     'four',
>     'five');
>



This is actually the correct result because

      'two'
      'three'

will be concatenated to 'twothree', which is isn't present
(leaving 'one', 'four', and 'five' as the 3 that SUM counted).


See also:

select
      'two'
      'three' ;

  ?column?
----------
  twothree
(1 row)


which is, I believe, as described in the SQL standard.


Erik Rijkers

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

Предыдущее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: BUG #14394: No error raised in IN-clause when commas are missing
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: BUG #14394: No error raised in IN-clause when commas are missing