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