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 1iNJCv-0000Go-OY for pgsql-general@arkaria.postgresql.org; Wed, 23 Oct 2019 16:09:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iNJCu-0001ap-EQ for pgsql-general@arkaria.postgresql.org; Wed, 23 Oct 2019 16:09:56 +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 1iNJCu-0001ai-2C for pgsql-general@lists.postgresql.org; Wed, 23 Oct 2019 16:09:56 +0000 Received: from mail-ot1-x331.google.com ([2607:f8b0:4864:20::331]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iNJCr-0003cT-SY for pgsql-general@lists.postgresql.org; Wed, 23 Oct 2019 16:09:54 +0000 Received: by mail-ot1-x331.google.com with SMTP id e11so17888980otl.5 for ; Wed, 23 Oct 2019 09:09:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=NNh4iGxW4PFZnFHB1sImTz9D/B0SzTlWCSOrdEud04o=; b=TwNQbMlnh/6IWWm/9C4JeG/W3sh2N+w9kK7/yo2+vz6EzB3iGD+wzHaw1tWPv/V9Hn 66b8KLs7+nOHsyQZZAhv3EaqngKVdciCuwI2fOlCKTQwsM/nloOXYMvAjBB0l4ml40dm 0YK/Vj4sT12e6uxDddQjAFZqQMPJYQVP9DMnH0uc08pt6t9WcKo5odW9kLTUuzGsUo98 oaPOE1N5ZXuN/AhBtmgIWCiTBabgMsVUDfgep8u9vBB9km+lKeL32GwCnpSTmMUSxwgq +HmnE39QPKg/BqQ0In7+TQn32r1Xsm1Iv/qRtM7H/j7wjOwB5GeUJZXNo3e+IKSMGD9k mlSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=NNh4iGxW4PFZnFHB1sImTz9D/B0SzTlWCSOrdEud04o=; b=bMLIWbnpo226fi1N/BdZSZp7ZIhfa5muVFJfcklSqoWbQ0eV6YrEvsDyHyslWdgQRL cRAWimnOoTHdzeBVb8oyIJ1aQ365iFkqjPecKZgFulXq0dILXppggUqd1Eb7DbBgPzTc XmzjP7zRGbzYNoiD+gv0buVHRW/WL0nA97yXK6BrDe7qIoSrOm8nUKybTWA00+CSCwLY 6TcKman+q0fLVfg03Dyw61KPpINN6x5s5I3OM2l0CetgpdF2stxeCpBj/vee1hJ4m5VE o8Q812NbGezWR4aSzNFQUN3f2TvBlu5pidDnzZU2O8G4rOQcj3gDh10KhE5UwJ/5jIYU EwFQ== X-Gm-Message-State: APjAAAWS5/mHTjlTEGfFsZG2tz5yRJVznNQ3qltrohWTiHIU9HOCVyPH 8R5FhGEpFw8wM1Mtx/rNy86T48xTJ8rxtw== X-Google-Smtp-Source: APXvYqx9McBaiRLf2QlWee0h5oNutVy2V51pV+lnJzlzSzCRASD6ttaX+slGIaV6QJ5n6fFvnzaAFw== X-Received: by 2002:a05:6830:1e8c:: with SMTP id n12mr7685955otr.360.1571846993121; Wed, 23 Oct 2019 09:09:53 -0700 (PDT) Received: from [192.168.1.10] (ip70-186-126-197.no.no.cox.net. [70.186.126.197]) by smtp.googlemail.com with ESMTPSA id n27sm6211454otr.32.2019.10.23.09.09.52 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Oct 2019 09:09:52 -0700 (PDT) Subject: Re: Is this a bug ? To: pgsql-general@lists.postgresql.org References: <6048315C-CE0E-482F-9F48-B300E4D7AC52@aol.com> <9df3ba0d-974d-f13d-ec91-bc22c3ab362b@gmail.com> <24295.1571846414@sss.pgh.pa.us> From: Ron Message-ID: Date: Wed, 23 Oct 2019 11:09:51 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <24295.1571846414@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 10/23/19 11:00 AM, Tom Lane wrote: > 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 should 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. Yes, that's my mistake. >> No doubt: it's a bug, no matter what the Pg devs say. > Complain to the SQL standards committee, not us. As much as I hate to say it, MSFT was right to ignore this bug in the standard. -- Angular momentum makes the world go 'round.