Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iNJ3n-0008J5-VA for pgsql-general@arkaria.postgresql.org; Wed, 23 Oct 2019 16:00:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iNJ3m-00058U-NQ for pgsql-general@arkaria.postgresql.org; Wed, 23 Oct 2019 16:00:30 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iNJ3m-00056K-8o for pgsql-general@lists.postgresql.org; Wed, 23 Oct 2019 16:00:30 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iNJ3i-0003Tk-4V for pgsql-general@lists.postgresql.org; Wed, 23 Oct 2019 16:00:29 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x9NG0ENH024296; Wed, 23 Oct 2019 12:00:14 -0400 From: Tom Lane To: Ron cc: pgsql-general@lists.postgresql.org Subject: Re: Is this a bug ? In-reply-to: <9df3ba0d-974d-f13d-ec91-bc22c3ab362b@gmail.com> References: <6048315C-CE0E-482F-9F48-B300E4D7AC52@aol.com> <9df3ba0d-974d-f13d-ec91-bc22c3ab362b@gmail.com> Comments: In-reply-to Ron message dated "Wed, 23 Oct 2019 10:55:35 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <24294.1571846414.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 23 Oct 2019 12:00:14 -0400 Message-ID: <24295.1571846414@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Ron writes: > On 10/23/19 10:51 AM, Geoff Winkless wrote: >> 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. > Then -- since the 'e' is separated from 'd' by a comma, the result shoul= d be = > "4", not "3". No, because your command is equivalent to select count(*) from bugtest where fld1 in ('a','b','cd','e'); 'cd' does not match any of the table rows, so 3 is the correct answer. > No doubt: it's a bug, no matter what the Pg devs say. Complain to the SQL standards committee, not us. regards, tom lane