Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pIB0h-00040Y-Fx for pgsql-bugs@arkaria.postgresql.org; Wed, 18 Jan 2023 16:09:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pIB0f-0004Qi-IS for pgsql-bugs@arkaria.postgresql.org; Wed, 18 Jan 2023 16:09:57 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pIB0f-0004QZ-AG for pgsql-bugs@lists.postgresql.org; Wed, 18 Jan 2023 16:09:57 +0000 Received: from mail-yw1-x112e.google.com ([2607:f8b0:4864:20::112e]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pIB0Y-0000OG-Nm for pgsql-bugs@lists.postgresql.org; Wed, 18 Jan 2023 16:09:56 +0000 Received: by mail-yw1-x112e.google.com with SMTP id 00721157ae682-4c24993965eso467962397b3.12 for ; Wed, 18 Jan 2023 08:09:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=americanefficient-com.20210112.gappssmtp.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=boPmr2O66m89nIqk+useA8ACfW2HFm5thO9v3yfAkYQ=; b=qSdMVjrgZDyUhcI3h7hMfXWu1dsQCkKca8S+zccEBkcGZF4OTtjkSJjFqNi+bWPQwY zI4ZrWIEzheeS/lhlWzVpX+o0ZK2/UT0EnaI94NB/y7QCqThZW5TImB0unwL6JGTCP9x 2c6NamyEaetiqc1E56n66nyliolhnFCotB1pTMiNMPAK0Wv0vMazAm6v8bVwKapLRmLe F07nxhXoz3LAjpbMn37fNABveGBUVzP3Gu9iQ1ygCnu1EUISEhoIJtxuQBVsvWJ74PBX g6KXVVfb1w7d2ox3zUVy6Q2J3FSdeaDKTyfcIcmYlWKRT8t3K2VejNXfAVFjs78tre91 /7+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=boPmr2O66m89nIqk+useA8ACfW2HFm5thO9v3yfAkYQ=; b=vOECp1WQQWrZ2CsxZimdJHS3ZzWq3GZFAOwJHaLCDqrAB4NjlU4gQsa7EzpD/RXDji oI8UXXAtk9y63LQLmf8aOQ1ui4zvPXuWiysRoXRKgju9LzNmHGUt4AA/5RK/WSYT9V1H c1wMnI0FzHiq3CJDuleBIzJbcIEyoAgDCmmt7eld1AuszGuB3p7zpPC7WEk8gZ7h+eEv g3TZ/DJgWxiW5Bd3CG07iEtnp0ry9LN68NsG5Oj8e+Zy5xSzyYKJVyvcZiO836GvM4+v C/9vomPQ/3U1+EEdFJyBP0aj6ZBSfCVRHfF8iuRbN3NJ0jZFDwzA4PODVImjg88uwG6u Y7Vg== X-Gm-Message-State: AFqh2kqm8FQWfK6nBn5+lwhclsdC8+Ras09YWw4t7CijKD8YvMJIsVrf vfyIAZWkGQK4taw562ZmJ5FSvw== X-Google-Smtp-Source: AMrXdXumVeVWS4sYS92ClB9rWRJrTe/L88Eis6s0Dd3b6L2h0G8Rach2V02g7m5k9HJR45RPTXDUYQ== X-Received: by 2002:a05:7500:3c3:b0:f0:52c3:ba72 with SMTP id p3-20020a05750003c300b000f052c3ba72mr598422gab.37.1674058189578; Wed, 18 Jan 2023 08:09:49 -0800 (PST) Received: from smtpclient.apple ([24.211.149.51]) by smtp.gmail.com with ESMTPSA id 3-20020a05620a070300b00706b69d3414sm1265233qkc.94.2023.01.18.08.09.49 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Jan 2023 08:09:49 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.300.101.1.3\)) Subject: Re: IN clause behaving badly with missing comma and line break From: Philip Semanchuk In-Reply-To: Date: Wed, 18 Jan 2023 11:09:38 -0500 Cc: Roman Cervenak , pgsql-bugs@lists.postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: <65C07914-4AB4-43F5-BC5B-E73F1FE99185@americanefficient.com> References: <1E97D89B-3195-4A55-918B-2C1152EEE497@americanefficient.com> To: Francisco Olarte X-Mailer: Apple Mail (2.3731.300.101.1.3) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Jan 18, 2023, at 11:06 AM, Francisco Olarte = wrote: >=20 > On Wed, 18 Jan 2023 at 16:21, Philip Semanchuk > wrote: >=20 >> .... We=E2=80=99ve adopted a formatting standard that helps us to = avoid surprises due to missing commas. We put one string literal on each = line and place the commas all in the same column with a significant = amount of white space to the left of the commas. With this safeguard in = place, it=E2=80=99s very easy to spot a missing comma. >>=20 >> WHERE t IN ('a' , >> 'foo' , >> 'bar' , >> ) >=20 > I believe that one is a syntax error ( last comma ). Ooops, yes, thanks for catching that. I spend about half of my time in = Python where that trailing comma is acceptable and idiomatic. Not so = much in SQL. :-)