andreas(dot)imboden(at)bl(dot)ch writes:
> -- no comma after 'two', no error message, incorrect result
> select sum(cvalue) from abug
> where cname in (
> 'one',
> 'two'
> 'three',
> 'four',
> 'five');
This is not a bug, it's required by the SQL standard's syntax for
string literals. Per the manual:
Two string constants that are only separated by whitespace *with
at least one newline* are concatenated and effectively treated as
if the string had been written as one constant.
https://www.postgresql.org/docs/9.6/static/sql-syntax-lexical.html#SQL-SYNTAX-CONSTANTS
regards, tom lane