From: Erik Rijkers <er@xs4all.nl>
To: andreas.imboden@bl.ch
Cc: pgsql-bugs@postgresql.org
Cc: pgsql-bugs-owner@postgresql.org
Subject: Re: BUG #14394: No error raised in IN-clause when commas are missing
Date: Mon, 24 Oct 2016 16:48:49 +0200
Message-ID: <757c799204a29dbd3dafc33e0bbffe5a@xs4all.nl> (raw)
In-Reply-To: <20161024142841.1423.19672@wrigleys.postgresql.org>
References: <20161024142841.1423.19672@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: er@xs4all.nl, andreas.imboden@bl.ch, pgsql-bugs-owner@postgresql.org
Subject: Re: BUG #14394: No error raised in IN-clause when commas are missing
In-Reply-To: <757c799204a29dbd3dafc33e0bbffe5a@xs4all.nl>
References: <20161024142841.1423.19672@wrigleys.postgresql.org> <757c799204a29dbd3dafc33e0bbffe5a@xs4all.nl>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox